Aici ma refer la switchbot by mijago.
inventorywindow.py
{
"name" : "Switchbot",
"type" : "button",
"x" : 169,
"y" : 37,
"tooltip_text" : "Schimba bonus",
"default_image" : "locale/es/ui/switcher1.tga",
"over_image" : "locale/es/ui/switcher2.tga",
"down_image" : "locale/es/ui/switcher2.tga",
},
Astea sunt functiile care le am in game.py dar este pe buton tastatura..
from switchbot import Bot self.switchbot = Bot() self.switchbot.Hide() onPressKeyDict[app.DIK_F6] = lambda : self.__toggleSwitchbot() def __toggleSwitchbot(self): if self.switchbot.bot_shown == 1: self.switchbot.Hide() else: self.switchbot.Show()Ce trebuie sa adaug in uiinventory ?






