39GUILayerNode::GUILayerNode(
49 const string& backgroundImage,
51 const GUIColor& backgroundImageEffectColorMul,
52 const GUIColor& backgroundImageEffectColorAdd,
58 GUIParentNode(screenNode, parentNode, id, flow, overflowX, overflowY, alignments, requestedConstraints, backgroundColor, backgroundImage, backgroundImageScaleGrid, backgroundImageEffectColorMul, backgroundImageEffectColorAdd, border, padding, showOn, hideOn)
75 for (
auto i = 0; i <
subNodes.size(); i++) {
77 if (guiSubNode->conditionsMet ==
false)
continue;
78 auto contentWidth = guiSubNode->getAutoWidth();
79 if (contentWidth > width) {
91 for (
auto i = 0; i <
subNodes.size(); i++) {
93 if (guiSubNode->conditionsMet ==
false)
continue;
94 auto contentHeight = guiSubNode->getAutoHeight();
95 if (contentHeight > height) {
96 height = contentHeight;
109 for (
auto i = 0; i <
subNodes.size(); i++) {
111 if (guiSubNode->conditionsMet ==
false)
continue;
112 guiSubNode->setTop(top);
121 for (
auto i = 0; i <
subNodes.size(); i++) {
123 if (guiSubNode->conditionsMet ==
false)
continue;
124 guiSubNode->setLeft(left);
134 for (
auto i = 0; i <
subNodes.size(); i++) {
136 if (guiSubNode->conditionsMet ==
false)
continue;
137 auto doLayoutSubNodes =
false;
139 guiSubNode->computedConstraints.height = height;
140 doLayoutSubNodes =
true;
143 guiSubNode->computedConstraints.width = width;
144 doLayoutSubNodes =
true;
146 if (
dynamic_cast<GUIParentNode*
>(guiSubNode) !=
nullptr && doLayoutSubNodes ==
true) {
147 (required_dynamic_cast<GUIParentNode*>(guiSubNode))->
layoutSubNodes();
161 for (
auto i = 0; i <
subNodes.size(); i++) {
163 if (guiSubNode->conditionsMet ==
false)
continue;
165 guiSubNode->requestedConstraints.height = subNodesHeight;
171 for (
auto i = 0; i <
subNodes.size(); i++) {
173 if (guiSubNode->conditionsMet ==
false)
continue;
175 guiSubNode->requestedConstraints.width = subNodesWidth;
const string getNodeType() override
int getContentWidth() override
int getContentHeight() override
void setTop(int top) override
Set computed top.
void layout() override
Layout.
void setLeft(int left) override
Set computed left.
bool isContentNode() override
void layoutSubNodes() override
Layout sub nodes.
GUI element node conditions.
GUI node requested constraints requested constraints type enum.
static STATIC_DLL_IMPEXT GUINode_RequestedConstraints_RequestedConstraintsType * STAR
static STATIC_DLL_IMPEXT GUINode_RequestedConstraints_RequestedConstraintsType * PIXEL
virtual void setLeft(int left)
Set computed left.
GUINode_ComputedConstraints computedConstraints
virtual void setTop(int top)
Set computed top.
GUINode_RequestedConstraints requestedConstraints
GUI parent node overflow enum.
static STATIC_DLL_IMPEXT GUIParentNode_Overflow * DOWNSIZE_CHILDREN
GUI parent node base class thats supporting child nodes.
virtual void computeHorizontalChildrenAlignment()
Compute horizontal children alignment.
void layout() override
Layout.
GUIParentNode_Overflow * overflowY
virtual void layoutSubNodes()
Layout sub nodes.
vector< GUINode * > subNodes
virtual void computeVerticalChildrenAlignment()
Compute vertical children alignment.
GUI screen node that represents a screen that can be rendered via GUI system.
GUI node computed constraints.
GUI node requested constraints entity.
GUINode_RequestedConstraints_RequestedConstraintsType * topType
GUINode_RequestedConstraints_RequestedConstraintsType * widthType
GUINode_RequestedConstraints_RequestedConstraintsType * leftType
GUINode_RequestedConstraints_RequestedConstraintsType * heightType
GUI node scale 9 grid entity.