Jump to content

Itemshop icon next to minimap


Recommended Posts

root/game.py 

Search:

            self.testAlignment.Show()

add down

        self.itemShopButton = ui.Button()
        self.itemShopButton.SetParent(self)
        self.itemShopButton.SetPosition(wndMgr.GetScreenWidth() - 200, 40)
        self.itemShopButton.SetUpVisual("d:/ymir work/ui/public/Middle_Button_01.sub")
        self.itemShopButton.SetOverVisual("d:/ymir work/ui/public/Middle_Button_02.sub")
        self.itemShopButton.SetDownVisual("d:/ymir work/ui/public/Middle_Button_03.sub")
        self.itemShopButton.SetEvent(ui.__mem_func__(self.__OnClickItemShopButton)) #the function you are using
        self.itemShopButton.Show()

search:

    def __PlayMusic(self, flag, filename):
        flag = int(flag)
        if flag:
            snd.FadeOutAllMusic()
            musicInfo.SaveLastPlayFieldMusic()
            snd.FadeInMusic("BGM/" + filename)
        else:
            snd.FadeOutAllMusic()
            musicInfo.LoadLastPlayFieldMusic()
            snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)

#unless you have a def from itemshop  ( np. def BINARY_ItemShopOpen )
add down:
 

    def __OnClickItemShopButton(self):
        if self.interface:
            self.interface.wndItemShop.RequestOpen()
 

 

                                                                                             this is an example, i don't know which itemshop you are using

 

 

  • Metin2 Dev 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.