if app.ENABLE_FAST_INVENTORY: class fasttnventorywindow(ui.ScriptWindow): def __init__(self, wndInventory): import exception if not wndInventory: exception.Abort("wndInventory parameter must be set to InventoryWindow") return ui.ScriptWindow.__init__(self) self.isLoaded = 0 self.wndInventory = wndInventory; self.wndFastInventoryLayer = None self.uiGuiEventPage = None self.__LoadWindow() def __del__(self): self.isLoaded = 0 self.wndTimeTitle = None self.wndInventory = None self.wndFastInventoryLayer = None self.wndSwitchbot = None ui.ScriptWindow.__del__(self) def Show(self): self.__LoadWindow() ui.ScriptWindow.Show(self) self.OpenFastInventory() def Close(self): self.CloseFastInventory() self.ClearDictionary() self.Hide() def OpenFastInventory(self): self.wndFastInventoryLayer.Show() self.AdjustPositionAndSize() def CloseFastInventory(self): self.wndFastInventoryLayer.Hide() self.AdjustPositionAndSize() def GetBasePosition(self): x, y = self.wndInventory.GetGlobalPosition() return x - 38, y def AdjustPositionAndSize(self): bx, by = self.GetBasePosition() self.SetPosition(bx, by) self.SetSize(bx + 135, self.GetHeight()) 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.ClickMenu3)) self.GetChild("Menu_4").SetEvent(ui.__mem_func__(self.ClickMenu4)) self.GetChild("Menu_5").SetEvent(ui.__mem_func__(self.OpenTimeEvent)) self.GetChild("Menu_6").SetEvent(ui.__mem_func__(self.OpenItemShop)) except: import exception exception.Abort("FastInventoryWindow.LoadWindow.BindObject")