I tried to add this system https://forum.turkmmo.com/konu/3831639-c-python-adalet-aeldra-yan-menu/
How can I add some functions on the buttons, inventory, special inventory or something else? An example would help
[CODE title="uiinventory"] def __LoadWindow(self):
if self.isLoaded == 1:
return
self.isLoaded = 1
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "UIScript/FastInventoryWindow.py")
except:
import exception
exception.Abort("FastInventoryWindow.LoadWindow.LoadObject")
try:
self.wndFastInventoryLayer = self.GetChild("FastInventoryLayer")
self.GetChild("Menu_1").SetEvent(ui.__mem_func__(self.ClickMenu1))
self.GetChild("Menu_2").SetEvent(ui.__mem_func__(self.ClickMenu2))
self.GetChild("Menu_3").SetEvent(ui.__mem_func__(self.ClickMenu3))
self.GetChild("Menu_4").SetEvent(ui.__mem_func__(self.ClickMenu4))
self.GetChild("Menu_5").SetEvent(ui.__mem_func__(self.ClickMenu5))
except:
import exception
exception.Abort("FastInventoryWindow.LoadWindow.BindObject")[/CODE]
Sysser
Kod:
1217 15:16:15523 ::
uiInventory.py(line:1015) __LoadWindow
FastInventoryWindow.LoadWindow.BindObject - <type 'exceptions.AttributeError'>:'FastInventoryWindow' object has no attribute 'ClickMenu1'
1217 15:16:15523 :: ============================================================================================================
1217 15:16:15524 :: Abort!!!!
1217 15:16:15525 ::
uiInventory.py(line:1125) __LoadWindow
uiInventory.py(line:973) __init__
uiInventory.py(line:1022) __LoadWindow
exception.py(line:36) Abort
InventoryWindow.LoadWindow.BindObject - <type 'exceptions.SystemExit'>:
1217 15:16:15525 :: ============================================================================================================
1217 15:16:15525 :: Abort!!!!