Jump to content

Recommended Posts

Can someone explain to me how to put the special inventory on the button next to the inventory?

I have tried several options but none of them are successful

The original code from the button but I don't understand anything how to do after it to put my special inventory on it


				self.wndFastInventoryLayer = self.GetChild("FastInventoryLayer")
				self.GetChild("Menu_1").SetEvent(ui.__mem_func__(self.ClickMenu1))
				self.GetChild("Menu_2").SetEvent(ui.__mem_func__(self.ToggleSwitchbotClick))
				self.GetChild("Menu_3").SetEvent(ui.__mem_func__(self.ClickMenu1))
				self.GetChild("Menu_4").SetEvent(ui.__mem_func__(self.ClickMenu1))
				self.GetChild("Menu_5").SetEvent(ui.__mem_func__(self.ClickMenu1))
				self.GetChild("Menu_6").SetEvent(ui.__mem_func__(self.ClickMenu1))
			except:
				import exception
				exception.Abort("FastInventoryWindow.LoadWindow.BindObject")
			try:
				import uiSwitchbot
				self.wndSwitchbot = uiSwitchbot.SwitchbotWindow()
			except:
				import exception
				exception.Abort("FastInventoryWindow.LoadWindow.BindObject")
		def ToggleOfflineShopClick(self):
			return True
		def ToggleSwitchbotClick(self):
			if self.wndSwitchbot.IsShow(): self.wndSwitchbot.Close()
			else: self.wndSwitchbot.Open()
		def ClickMenu1(self):
			if self.wndInventory.interface:
				self.wndInventory.interface.ToggleSwitchbotWindow()
			return True

I did that but it doesn't work, something is definitely wrong but I don't know how to add a function to the button myself

				self.GetChild("Menu_1").SetEvent(ui.__mem_func__(self.ClickMenu1))
				self.GetChild("Menu_2").SetEvent(ui.__mem_func__(self.SpecialInventoryButton))
				self.GetChild("Menu_3").SetEvent(ui.__mem_func__(self.ClickMenu3))
				self.GetChild("Menu_4").SetEvent(ui.__mem_func__(self.ClickMenu1))
				self.GetChild("Menu_5").SetEvent(ui.__mem_func__(self.ClickMenu1))
				self.GetChild("Menu_6").SetEvent(ui.__mem_func__(self.ClickMenu1))
			except:
				import exception
				exception.Abort("FastInventoryWindow.LoadWindow.BindObject")
			try:
				import exception
				self.interface.ToggleExtendedInventoryWindow()
			except:
				import exception
				exception.Abort("FastInventoryWindow.LoadWindow.BindObject")
		def ClickMenu1(self):
			return True
		def SpecialInventoryButton(self):
			if app.WJ_SPLIT_INVENTORY_SYSTEM:
				def __PressExtendedInventory(self):
					if self.interface:
						self.interface.ToggleExtendedInventoryWindow()
		def ClickMenu3(self):
			if self.wndInventory.interface:
				self.wndInventory.interface()
			return True

Merry Christmas to everyone ❤️

Link to comment
https://metin2.dev/topic/31931-button-on-inventory/
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.