Game Development Community

GuiArrayCtrl

by Nelson A. K. Gonsalves · in Torque Game Engine · 09/14/2001 (5:02 pm) · 6 replies

Has anyone figured out how does it works? I mean... I just get a colorfull array of blocks.... and no apparent commands to intruct it to get the data from somewhere...

#1
09/14/2001 (5:50 pm)
In addiction to the previous post:
GuiFrameCtrl -> how does it work?

The reason Im asking this is my Inventory system... I have it working now, but its using the GuiTextListCtrl, and that not very pretty for a Inventory... sure, getting a list of every item you have is cool, but having bitmaps on a grid showing your items is even cooler...
#2
09/14/2001 (6:21 pm)
Ok Ok
I got how the GuiFrameControl works... And it MAYBE will do what I want for my backpack... thats if I figure how to add gui objects on the fly... is it possible? For example: The game is running, can I add a new bitmapCtrl, modify its properties and then show it?
#3
09/14/2001 (7:42 pm)
YAY, its me again!

Anyway, how do I set the parent of a guicontrol?
#4
09/14/2001 (8:22 pm)
depends what you mean exactly... Each Gui Control has a typedef GuiSomething Parent in their class... but its probably not what you meant since I can't think of how that would effect an inventory system at all :)

In scripting terms, parent would mean the control that it's contained in... if you look in the .gui files you'll see controls inside the open and closing brackets of other controls (this is how the tree view is built in the Gui Editor).. I'm not sure how to make a control a child of another without just editing the .gui file by hand and putting it inside the others curly brackets though there's probably a way

or you might be thinking of something completely different

-nohbdy
#5
09/14/2001 (10:31 pm)
Yes you can add / delete / modify Gui elements on the fly.

When you want to add something you would use:

{parent gui object}.add({child gui name or object reference});


Remove:

{parent gui object}.remove({child gui name or object reference});

Delete:

{child gui name or object reference}.delete();
#6
09/14/2001 (11:05 pm)
Thank you Labrat and Nohbdy... My Inventory system is fully functional now... I just need to refine some functions and it will be done...

*Yawn* off to bed now.... 3am in here...