Das hab ich soweit in der Game
Code:
def __ServerCommand_Build(self):
#Boniswitch
"BoniSwitch" : self.__MakeBoniSwitch,
def __MakeBoniSwitch(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, "Button funkt")
import switchbot
self.switchidialog = switchbot.Bot()
self.switchidialog.Show()
und in der inventorywindow
Code:
{
"name" : "BoniSwitch",
"type" : "button",
"x" : 55,
"y" : 305,
"tooltip_text" : "BoniSwitch",
"default_image" : "d:/ymir work/ui/game/inventar/boniswitch.tga",
"over_image" : "d:/ymir work/ui/game/inventar/boniswitch2.tga",
"down_image" : "d:/ymir work/ui/game/inventar/boniswitch2.tga",
},
trotzdem nimmt er den button nicht an, nicht mal der chat teil kommt..
py heißt switchbot.py.
sonst ist alles nochmal im anhang