Jump to content

Recommended Posts

i have a little problem, i added the button for switch, but when i press click on it dont works, how i can add that switchbot on button?

https://metin2.download/picture/v7L0hrS76cJa7319XCH9OX3jAA59k3X9/.jpg

inventorywindow

                        {
                            "name" : "SwitchButton",
                            "type" : "button",
                            "x" : 100,
                            "y" : 3,
                            "tooltip_text" : uiScriptLocale.SWITCH_TITLE,
                            "default_image" : "d:/ymir work/ui/terkea/bonus_button_01.tga",
                            "over_image" : "d:/ymir work/ui/terkea/bonus_button_02.tga",
                            "down_image" : "d:/ymir work/ui/terkea/bonus_button_03.tga",
                        },
uiinventory
self.SwitchButton=self.GetChild2("SwitchButton")

# SwitchButtonifself.SwitchButton:
self.SwitchButton.SetEvent(ui.__mem_func__(self.ClickSwitchButton))

self.SwitchButton=None

# SwitchButtondefClickSwitchButton(self):
if
self.switchbot.bot_shown ==1:
self.switchbot.Hide()
else:
self.switchbot.Show()

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.