Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Python] Felszerelés cserélő panel
#1
Equipment Changer 2

(Öv, vállpánt, kosztüm fegyver, haj, vért csere #hozzáadva)

[Image: zV8FURM.png]


ConstInfo.py-ba:
Code:
FAST_PAGE = 1
FAST_EQUIP = 0


Leltárba gomb

constinfo.py-t megnyitod!


Berakod ezt:
Code:
equipmentchanger = 0


uiinventory.py-t megnyitod!

Rákeresel erre:
Code:
def __init__(self):

A funkció vége felé írod ezt:
Code:
self.Equip = None

Keress rá:
Code:
self.costumeButton = self.GetChild2("CostumeButton")

Alá írod ezt:
Code:
self.equipButton = self.GetChild2("EquipButton")

Rákeresel erre a tömbre:
Code:
        # Costume Button
        if self.costumeButton:
            self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton))

Aláírod ezt:
Code:
        # Equipment changer
        if self.equipButton:
            self.equipButton.SetEvent(ui.__mem_func__(self.ClickEquipButton))


Rákeresel erre:
Code:
def ClickCostumeButton(self):



Alá írod a funkciót:
Code:
    def ClickEquipButton(self):
        import uifastequip
        if constInfo.equipmentchanger == 0:
            constInfo.equipmentchanger = 1
            self.uuifastequipDlg = uifastequip.changeequip()
            self.uuifastequipDlg.Show()
        elif constInfo.equipmentchanger == 1:
            constInfo.equipmentchanger = 0
            self.uuifastequipDlg = uifastequip.changeequip()
            self.uuifastequipDlg.Hide()


inventorywindow.py-t megnyitod!

MallButton rész fölé írod ezt:
Code:
                        ##EquipButton
                        {
                            "name" : "EquipButton",
                            "type" : "button",
                    
                            "x" : 114, # írd át
                            "y" : 90, # írd át
                            
                            "tooltip_text" : "Felszerelés cserélő ",
                            
                            "default_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_01.tga",
                            "over_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_02.tga",
                            "down_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_03.tga",                
                        },


Üdv, Pisti95


Attached Files
.zip   Equipment changer (costume & belt).zip (Size: 92.31 KB / Downloads: 8)
[Image: 1453876818-b8928becdb9a3058b7c9ff22ccc5caf6.jpeg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)