uiinventory.py aç ve arat
self.costumeButton = self.GetChild2("CostumeButton")
Altına ekle
self.shopButton = self.GetChild2("ShopButton")
Arat
# Costume Button
if self.costumeButton:
self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton))
Altına ekle
# Shop Button
if self.shopButton:
self.shopButton.SetEvent(ui.__mem_func__(self.ClickShopButton))
Üstüne ekle.
Arat
def ClickCostumeButton(self):
if self.wndCostume:
if self.wndCostume.IsShow():
self.wndCostume.Hide()
else:
self.wndCostume.Show()
else:
self.wndCostume = CostumeWindow(self)
self.wndCostume.Show()
Üstüne ekle
def ClickShopButton(self):
net.SendChatPacket("/open_shop")
Şimdi buton ekle.
inventorywindow.py aç ve arat
## CostumeButton
{
"name" : "CostumeButton",
"type" : "button",
"x" : 78,
"y" : 5,
"tooltip_text" : "Costume",
"default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
"over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
"down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
},
Altına ekle
## ShopButton
{
"name" : "ShopButton",
"type" : "button",
"x" : 118,
"y" : 148,
"tooltip_text" : "Shop",
"default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
"over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
"down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
},