MCPcopy Create free account
hub / github.com/chrxh/alien / doesMouseCursorIntersectSliderBar

Method doesMouseCursorIntersectSliderBar

source/Gui/SimulationScrollbar.cpp:101–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101bool _SimulationScrollbar::doesMouseCursorIntersectSliderBar(RealRect const& rect) const
102{
103 auto sliderbarRect = calcSliderbarRect(rect);
104
105 ImVec2 mousePositionAbsolute = ImGui::GetMousePos();
106 return mousePositionAbsolute.x >= rect.topLeft.x + sliderbarRect.topLeft.x - 3
107 && mousePositionAbsolute.x <= rect.topLeft.x + sliderbarRect.bottomRight.x + 3
108 && mousePositionAbsolute.y >= rect.topLeft.y + sliderbarRect.topLeft.y - 3
109 && mousePositionAbsolute.y <= rect.topLeft.y + sliderbarRect.bottomRight.y + 3;
110}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected