Game Development Community

GUI addObject

by zede05 · in Torque 3D Professional · 02/28/2011 (4:50 am) · 1 replies

I'm trying to make a menu list with the GUI, where players can get new moves and the new move will show up in the menu listing at the top. I'm trying to use GuiControl addObject and adding the thing in GuiDynamicCtrlArrayControl, however, the element always shows up at the bottom instead of the top. Anyone know what's going on? Thanks.

#1
02/28/2011 (4:44 pm)
That would be the expected behavior for the addObject function. What you need to do is create an insertObject function to pass in an index. AN example of this can be found in the menubar.cpp file. Just do a search for insertObject in the code and you should find it easy enough.