Game Development Community

StackPanel T3D

by elvince · 11/15/2009 (12:16 pm) · 5 comments

This gui is an enhancement of current GuiStackControl in T3D 1.0.1.

Features:

1/ All type of common horizontal/vertical stacking: Top to bottom, bottom to top, left to right, right to left.

2/ Additional types of horizontal/vertical stacking : stackFromLeftLeftward, stackFromRightLeftward, vertStackBottomUpward, vertStackTopUpward. Those new stack type are identical to their "normal" one except that the extension of the panel will go in the opposite direction. For example, a stack top to bottom will extent the object height to the bottom of your screen, if you use the upward one, you have the stack going up.

3/ Extension management: stackFromLeft,stackFromTop type can have automatic column/row in the stack.
This will only work if you set : ChangeChildPosition to true
For the moment, the extension will only go to the bottom for horizontal stacking and to the left for vertical stacking.

New parameters:

MaxExtent:
This parameter is driving if the panel will be on multiple row/column. If "0 0" (Default value), this is a one column/row panel. If you change the first part and you are in a stacking horizontal, this will drive the max width of you control. If you change the second part and you are in a stacking vertical, this will drive the max height of you control.

ExtensionSize:
This parameter will drive the height size of a row or width size of a column if you set ChangeChildSizeToFit to true. By default, this value will take the current width of you empty control.

Screen shots

in those captures, the Fire orbs is set in first in the stack.
elvince.free.fr/T3D/Top1col.jpgelvince.free.fr/T3D/Bottom.jpgelvince.free.fr/T3D/left.jpg
Same with 2 columns
elvince.free.fr/T3D/lest2col.jpgelvince.free.fr/T3D/Top2col.jpg

Source

guiStackPanel.h
guiStackPanel.cpp

If you have any comments, please don't hesitate. I tried to test the maximum of cases, but if you find some bugs, please post and I will try to solve them.

If you make useful enhancement, please post them and I will update the resource.

Thanks,

#1
11/15/2009 (1:17 pm)
Oh this is really cool! Awesome for something like a dot / hex / buff display. Thanks a lot!
#2
11/15/2009 (6:38 pm)
I was just needing something like this. Thanks for posting this!
#3
11/15/2009 (8:17 pm)
Thank you very much elvince, i will try to use this in my project and send screenshot :)
#4
11/17/2009 (6:38 am)
Very nice.
Thanks for sharing :)
#5
11/20/2009 (5:22 am)
Very cool additions. Nice work!