Guest Ezrekith Posted October 14, 2017 at 11:09 PM Share Posted October 14, 2017 at 11:09 PM (edited) Hi folks! i'd like to share an easier way to configure your inventory page buttons. First of all you need to remove the old one so just search for the following lines and delete them: #In class InventoryWindow(ui.ScriptWindow): #Search for this lines and delete them: self.inventoryTab = [] self.inventoryTab.append(self.GetChild("Inventory_Tab_01")) self.inventoryTab.append(self.GetChild("Inventory_Tab_02")) self.inventoryTab.append(self.GetChild("Inventory_Tab_03")) self.inventoryTab.append(self.GetChild("Inventory_Tab_04")) self.inventoryTab[0].SetEvent(lambda arg=0: self.SetInventoryPage(arg)) self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg)) self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg)) self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg)) self.inventoryTab[0].Down() self.SetInventoryPage(0) self.inventoryTab = [] def SetInventoryPage(self, page): self.inventoryTab[self.inventoryPageIndex].SetUp() self.inventoryPageIndex = page self.inventoryTab[self.inventoryPageIndex].Down() self.RefreshBagSlotWindow() So basically you deleted the old inventory page navigator functions, now lets add the new one! #In the InventoryWindow(ui.ScriptWindow): class #Search for: def __LoadWindow(self): #After the: self.RefreshStatus() #Add the following lines: self.__MakeMeANewInventoryButtonFunctionHehe(9) #9 must be replaced by your inventory page count! self.RefreshBagSlotWindow() #After this you have to define the __MakePageButton function. #Search for this: def SetEquipmentPage(self, page): #And add this after the definition of SetEquipmentPage: def __MakeMeANewInventoryButtonFunctionHehe(self, pageCount): self.curPageIndex = 0 self.pageButtonList = [] idx_page = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"] #Replace this with your inventory page count! idx_pos = [-30, -30, -30, -30, -30, -30, -30, -30, -30] #Replace this with your inventory page count! And position it by yourself. pos = -130 #Position it by yourself. for i in xrange(9): #Replace the 9 with your inventory page count! button = ui.RadioButton() button.SetParent(self) button.SetUpVisual("REPLACE THIS WITH YOUR BUTTON IMAGE!!!") button.SetOverVisual("REPLACE THIS WITH YOUR BUTTON IMAGE!!!") button.SetDownVisual("REPLACE THIS WITH YOUR BUTTON IMAGE!!!") button.SetWindowHorizontalAlignCenter() button.SetWindowVerticalAlignCenter() if i < 9: #Replace the 9 with your inventory page count! button.SetPosition(pos, idx_pos[i]) pos += 32 button.SetText(idx_page[i]) button.SetEvent(lambda arg=i: self.SelectPage(arg)) button.Show() self.pageButtonList.append(button) self.pageButtonList[0].Down() def SelectPage(self, index): self.inventoryPageIndex = index for btn in self.pageButtonList: btn.SetUp() self.pageButtonList[index].Down() self.RefreshBagSlotWindow() Now search for your inventory.py in locale or uiscript whatever you use and delete the old buttons. And thats it! Since my design is so much different than any other design please DO NOT FORGET to replace the button visuals with yours and the positions of the button! Good luck with that! Edited October 16, 2017 at 06:18 AM by Ezrekith Link to comment Share on other sites More sharing options...
thespeedy Posted October 16, 2017 at 01:52 AM Share Posted October 16, 2017 at 01:52 AM 1016 03:51:24255 :: File "ui.py", line 1016, in CallEvent 1016 03:51:24255 :: File "uiInventory.py", line 479, in <lambda> 1016 03:51:24255 :: AttributeError 1016 03:51:24255 :: : 1016 03:51:24255 :: 'InventoryWindow' object has no attribute 'SelectPage' 1016 03:51:24255 :: Link to comment Share on other sites More sharing options...
Guest Ezrekith Posted October 16, 2017 at 06:17 AM Share Posted October 16, 2017 at 06:17 AM Oh sorry i missed this part: Add this under the __MakeMeANewInventoryButtonFunctionHehe definition. def SelectPage(self, index): self.inventoryPageIndex = index for btn in self.pageButtonList: btn.SetUp() self.pageButtonList[index].Down() self.RefreshBagSlotWindow() Topic edited, thank you and sorry! Link to comment Share on other sites More sharing options...
Sinister Posted October 16, 2017 at 06:24 AM Share Posted October 16, 2017 at 06:24 AM And what can i do with this? Link to comment Share on other sites More sharing options...
Guest Ezrekith Posted October 16, 2017 at 06:26 AM Share Posted October 16, 2017 at 06:26 AM Well if you take a look into you uiinventory and inventory.py you can see that the way ymir made the inventory buttons is kinda ugly, so you basically clean the code for that part. Link to comment Share on other sites More sharing options...
thespeedy Posted October 16, 2017 at 01:31 PM Share Posted October 16, 2017 at 01:31 PM (edited) Nice but i have the ugly ymir buttons uiinventory.py Edited October 16, 2017 at 01:35 PM by thespeedy Link to comment Share on other sites More sharing options...
Marco Posted October 16, 2017 at 01:34 PM Share Posted October 16, 2017 at 01:34 PM 3 minutos atrás, thespeedy disse: Nice but i have the ugly ymir buttons do you want the normal buttons or the "new buttons"? Link to comment Share on other sites More sharing options...
thespeedy Posted October 16, 2017 at 01:35 PM Share Posted October 16, 2017 at 01:35 PM New^^ Link to comment Share on other sites More sharing options...
Marco Posted October 16, 2017 at 01:44 PM Share Posted October 16, 2017 at 01:44 PM (edited) u have discord? skype? Enter here : https://discord.gg/b5z2nQF or post ur inventorywindow.py Edited October 16, 2017 at 01:44 PM by L2P Link to comment Share on other sites More sharing options...
thespeedy Posted October 16, 2017 at 01:50 PM Share Posted October 16, 2017 at 01:50 PM (edited) Skype: speedyHAZE inventorywindow.py Edited October 16, 2017 at 01:51 PM by thespeedy Link to comment Share on other sites More sharing options...
Marco Posted October 16, 2017 at 01:51 PM Share Posted October 16, 2017 at 01:51 PM 1 minuto atrás, thespeedy disse: Skype: speedyHAZE Done Link to comment Share on other sites More sharing options...
thespeedy Posted October 16, 2017 at 01:54 PM Share Posted October 16, 2017 at 01:54 PM my inventory^^ uiinventory.py inventorywindow.py Link to comment Share on other sites More sharing options...
Marco Posted October 16, 2017 at 02:02 PM Share Posted October 16, 2017 at 02:02 PM (edited) 33 minutos atrás, thespeedy disse: my inventory^^ uiinventory.py inventorywindow.py Try this inventorywindow.py uiinventory.py Edited October 16, 2017 at 02:27 PM by L2P Link to comment Share on other sites More sharing options...
thespeedy Posted October 16, 2017 at 05:55 PM Share Posted October 16, 2017 at 05:55 PM 3 hours ago, L2P said: Try this inventorywindow.py uiinventory.py Ty you are the Best Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now