16 using tdme::gui::nodes::GUIHorizontalScrollbarInternalController_State;
25 GUIHorizontalScrollbarInternalController::GUIHorizontalScrollbarInternalController(
GUINode* node)
65 if (barWidthRelative > 1.0f) barWidthRelative = 1.0f;
67 if (barWidth < 20.0f) barWidth = 20.0f;
76 if (scrollableWidth > 0.0f) {
87 if (scrollableWidth <= 0.0f)
return;
90 if (childrenRenderOffsetX < 0) childrenRenderOffsetX = 0;
91 if (childrenRenderOffsetX > scrollableWidth) childrenRenderOffsetX = scrollableWidth;
98 if (event->
getType() == GUIMouseEvent::MOUSEEVENT_MOVED) {
105 event->setProcessed(
true);
112 if (event->
getX() + barOffsetX < barLeft) {
117 if (event->
getX() + barOffsetX > barLeft + barWidth) {
122 if (event->
getX() + barOffsetX >= barLeft && event->
getX() + barOffsetX < barLeft + barWidth) {
123 mouseXOffset =
static_cast<int>((
event->getX() - barLeft));
126 event->setProcessed(
true);
131 event->setProcessed(
true);
137 event->setProcessed(
true);
void addMouseOutCandidateNode(GUINode *node)
Add node that is a possible mouse out candidate as it received a mouse over.
GUIMouseEventType getType() const
int getContentWidth() override
GUI node controller base class.
float computeParentChildrenRenderOffsetXTotal()
bool isEventBelongingToNode(GUIMouseEvent *event, Vector2 &nodeCoordinate)
Is event belonging to node.
GUINode_ComputedConstraints computedConstraints
GUIParentNode * getParentControllerNode()
GUIScreenNode * getScreenNode()
GUI parent node base class thats supporting child nodes.
void setChildrenRenderOffsetX(float childrenRenderOffSetX)
Set children render offset x.
float getChildrenRenderOffsetX()
GUI screen node that represents a screen that can be rendered via GUI system.
GUINode * getNodeById(const string &nodeId)
Get GUI node by id.
Mutable utf8 aware string class.
GUI node computed constraints.