Man, I think I'm getting in over my head with this dialog.
It's my workaround for the problem that I asked about awhile ago: Link.
What I'm doing is making a dialog, that will update whenever an item is bought or sold. It has 15 buttons, ordered in 3 columns, with 5 rows each.
I have it with a image, under a button.(Yes, both are required for what I'm looking to do.) Each is saved in a variable Players:Dialogs:InventoryImage(Player,xCo-ordinate,yCo-ordinate) and Players:Dialogs:InventoryButtons(P,x,y), which are arrays of 12,3,5.
I want it so that when you click it, the Button color changes, to show that it has been selected. At the same time, I want the image to update to the icon of the item.
Now the tricky part, is I want it to only allow you to click if you have enough room in your UnitB inventory. UnitB varies, as does the inventory size. I created a function to return as an integer the size of UnitB's inventory. CargoSizeofShip(parPlayer).
This is what I have for the first of 15 slots in the inventory.
I don't even know where to go from here. How to do the updating for the icon/tooltip that the item is.
Also, is there a way to reference index numbers. Say if its Players:Dialogs:InventoryButton(x,y,z) used, that I can copy those index numbers, and send them to Players:Dialogs:InventoryImage(x,y,z), rather then having to make a if then for each one. If that makes any sense.
There is no way to reference array numbers directly but you would be able to save the array index number you used to call it (when calling an array you must use an integer value, just set this value as a globabl variable) which you then can use in a seperate trigger.
Man, I think I'm getting in over my head with this dialog.
It's my workaround for the problem that I asked about awhile ago: Link.
What I'm doing is making a dialog, that will update whenever an item is bought or sold. It has 15 buttons, ordered in 3 columns, with 5 rows each.
I have it with a image, under a button.(Yes, both are required for what I'm looking to do.) Each is saved in a variable Players:Dialogs:InventoryImage(Player,xCo-ordinate,yCo-ordinate) and Players:Dialogs:InventoryButtons(P,x,y), which are arrays of 12,3,5.
I want it so that when you click it, the Button color changes, to show that it has been selected. At the same time, I want the image to update to the icon of the item.
Now the tricky part, is I want it to only allow you to click if you have enough room in your UnitB inventory. UnitB varies, as does the inventory size. I created a function to return as an integer the size of UnitB's inventory. CargoSizeofShip(parPlayer).
This is what I have for the first of 15 slots in the inventory.
I don't even know where to go from here. How to do the updating for the icon/tooltip that the item is.
Also, is there a way to reference index numbers. Say if its Players:Dialogs:InventoryButton(x,y,z) used, that I can copy those index numbers, and send them to Players:Dialogs:InventoryImage(x,y,z), rather then having to make a if then for each one. If that makes any sense.
There is no way to reference array numbers directly but you would be able to save the array index number you used to call it (when calling an array you must use an integer value, just set this value as a globabl variable) which you then can use in a seperate trigger.