Author Topic: Dynamic Gui Menu(s)  (Read 867 times)

Well, I've found my self in need of creating both an Inventory and a Vendor GUI, yet I have little to no idea of how to make the menu Dynamically add items and such. Also, I can create the buttons and the functions for them but I have utterly no idea on how I would create windows like the following picture displays.

Key:
Blue = Traders Menu, E.G $TraderItem1["Trader"] = "CopperSword";
Red = Players Inventory, E.G CopperSwordx13
White = Item Info, E.G $ItemPrice = 50; $ItemName = "CopperSword".


Pic: Yes, I know the picture looks like stuff.



Link  This should contain all info needed.  If not, ask again :D

Link  This should contain all info needed.  If not, ask again :D
Not really, I can code almost everything in that topic.

You could loop through all items and add them to the list.

You could loop through all items and add them to the list.
Example Please, meaning adding the item function.

Example Please, meaning adding the item function.
Something like (not tested):
Code: [Select]
for(%i=0;%i<DataBlockGroup.getCount();%i++)
{
%obj=DataBlockGroup.getObject(%i);
if(%obj.getClassName() $= "ItemData")
{
YOURLISTOBJ.addFront(%obj.uiName,%obj);
}
Then to get the selected item you would use:
Code: [Select]
YOURLISTOBJ.getSelected()
EDIT: I just realized you wanted a Text List. My code is for a PopUp Menu.

Not really, I can code almost everything in that topic.
I could code the GUI for you if you want, and then you apply it to your mod.
« Last Edit: December 18, 2009, 08:30:02 PM by AGlass0fMilk »

I could code the GUI for you, and you could do the rest if you want.
Sure, do you have Msn?

Sorry for the double post, but how would I get a selected item in the GuiTextListProfile?

Sorry for the double post, but how would I get a selected item in the GuiTextListProfile?
Dump methods using TextListObject.dump();
I think its something like TextListObject.getRowTextByID(TextListObject.getSelectedID());

Yea, it took me a while but Rky and I figured out a way.