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.
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.
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.



Same with 2 columns


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,
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.


Same with 2 columns


Source
guiStackPanel.hguiStackPanel.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,
About the author
Associate Konrad Kiss
Bitgap Games