Hey.
My PC has two inventories, which appear in the same inventory box, but at different times (handled when the player clicks the buttons associated with each set of items). The item categories are not anywhere near the same sizes, so I need to have two separate item height/width designations, imposed by clicking the same buttons on the icon bar.
I tried setting the ItemHeight and ItemWidth properties within the code that's performed as a result of the player clicking on the buttons to bring up the inventory window, but that seems to do very strange things like not show any items in one inventory set and only showing one in the other.
The code associated with the two buttons is as follows:
Code: ags
The other one is identical, with the exception of having different variables called in CopyInventory();.
In the GUI editor I have the size of invCustomInv as 211x127 and item size as 120x18 (the size of the other set of inventory items).
If I take out the height/width code and just use the settings in the GUI editor, everything works. I'm confused.Ã,Â
My PC has two inventories, which appear in the same inventory box, but at different times (handled when the player clicks the buttons associated with each set of items). The item categories are not anywhere near the same sizes, so I need to have two separate item height/width designations, imposed by clicking the same buttons on the icon bar.
I tried setting the ItemHeight and ItemWidth properties within the code that's performed as a result of the player clicking on the buttons to bring up the inventory window, but that seems to do very strange things like not show any items in one inventory set and only showing one in the other.
The code associated with the two buttons is as follows:
function btnIconInv_Click(GUIControl *control, MouseButton button) {
Ã,Â
Ã, CopyInventory(1, 12); //copy inventory
Ã, UpdateInventory();
Ã, invCustomInv.Height = 25;
Ã, invCustomInv.Width = 30;
Ã, gui[2].Visible = true; //open inventory
Ã, mouse.Mode = eModeInteract;
Ã, mouse.UseModeGraphic(eModePointer);
Ã, gIconbar.Visible = false;
}
The other one is identical, with the exception of having different variables called in CopyInventory();.
In the GUI editor I have the size of invCustomInv as 211x127 and item size as 120x18 (the size of the other set of inventory items).
If I take out the height/width code and just use the settings in the GUI editor, everything works. I'm confused.Ã,Â
