MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / InputScrollPartUpdateHLeft

Function InputScrollPartUpdateHLeft

src/openrct2-ui/input/MouseInput.cpp:857–869  ·  view source on GitHub ↗

* * rct2: 0x006E9A60 */

Source from the content-addressed store, hash-verified

855 * rct2: 0x006E9A60
856 */
857 static void InputScrollPartUpdateHLeft(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id)
858 {
859 auto* windowMgr = GetWindowManager();
860 if (windowMgr->FindByNumber(w.classification, w.number) != nullptr)
861 {
862 auto& scroll = w.scrolls[scroll_id];
863 scroll.flags |= HSCROLLBAR_LEFT_PRESSED;
864 if (scroll.contentOffsetX >= 3)
865 scroll.contentOffsetX -= 3;
866 widgetScrollUpdateThumbs(w, widgetIndex);
867 windowMgr->InvalidateWidgetByNumber(w.classification, w.number, widgetIndex);
868 }
869 }
870
871 /**
872 *

Callers 1

InputScrollContinueFunction · 0.85

Calls 4

GetWindowManagerFunction · 0.85
widgetScrollUpdateThumbsFunction · 0.85
FindByNumberMethod · 0.45

Tested by

no test coverage detected