TDME2 1.9.121
GUIPanelNode.cpp
Go to the documentation of this file.
2
3#include <string>
4#include <unordered_set>
5
6#include <tdme/tdme.h>
8
9using std::string;
10using std::unordered_set;
11
14
15GUIPanelNode::GUIPanelNode(
16 GUIScreenNode* screenNode,
17 GUIParentNode* parentNode,
18 const string& id,
19 GUINode_Flow* flow,
20 GUIParentNode_Overflow* overflowX,
21 GUIParentNode_Overflow* overflowY,
22 const GUINode_Alignments& alignments,
23 const GUINode_RequestedConstraints& requestedConstraints,
24 const GUIColor& backgroundColor,
25 const string& backgroundImage,
26 const GUINode_Scale9Grid& backgroundImageScale9Grid,
27 const GUIColor& backgroundImageEffectColorMul,
28 const GUIColor& backgroundImageEffectColorAdd,
29 const GUINode_Border& border,
30 const GUINode_Padding& padding,
31 const GUINodeConditions& showOn,
32 const GUINodeConditions& hideOn,
34) :
35 GUILayoutNode(screenNode, parentNode, id, flow, overflowX, overflowY, alignments, requestedConstraints, backgroundColor, backgroundImage, backgroundImageScale9Grid, backgroundImageEffectColorMul, backgroundImageEffectColorAdd, border, padding, showOn, hideOn, alignment)
36{
37}
38
40{
41 return "panel";
42}
43
44void GUIPanelNode::determineMouseEventNodes(GUIMouseEvent* event, bool floatingNode, unordered_set<string>& eventNodeIds, unordered_set<string>& eventFloatingNodeIds)
45{
46 GUILayoutNode::determineMouseEventNodes(event, floatingNode, eventNodeIds, eventFloatingNodeIds);
47 if (isEventBelongingToNode(event) == true) {
48 event->setProcessed(true);
49 }
50}
51
GUI element node conditions.
bool isEventBelongingToNode(GUIMouseEvent *event, Vector2 &position)
Is event belonging to node.
Definition: GUINode.cpp:973
GUI panel node TODO: remove me!
Definition: GUIPanelNode.h:39
const string getNodeType() override
void determineMouseEventNodes(GUIMouseEvent *event, bool floatingNode, unordered_set< string > &eventNodeIds, unordered_set< string > &eventFloatingNodeIds) override
Determine mouse event nodes.
GUI parent node base class thats supporting child nodes.
Definition: GUIParentNode.h:43
void determineMouseEventNodes(GUIMouseEvent *event, bool floatingNode, unordered_set< string > &eventNodeIds, unordered_set< string > &eventFloatingNodeIds) override
Determine mouse event nodes.
GUI screen node that represents a screen that can be rendered via GUI system.
Definition: GUIScreenNode.h:57
GUI node border entity.
GUI node padding entity.
GUI node scale 9 grid entity.