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

Function InputScrollPartUpdateVTop

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

* * rct2: 0x006E9C37 */

Source from the content-addressed store, hash-verified

901 * rct2: 0x006E9C37
902 */
903 static void InputScrollPartUpdateVTop(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id)
904 {
905 auto* windowMgr = GetWindowManager();
906 if (windowMgr->FindByNumber(w.classification, w.number) != nullptr)
907 {
908 auto& scroll = w.scrolls[scroll_id];
909 scroll.flags |= VSCROLLBAR_UP_PRESSED;
910 if (scroll.contentOffsetY >= 3)
911 scroll.contentOffsetY -= 3;
912 widgetScrollUpdateThumbs(w, widgetIndex);
913 windowMgr->InvalidateWidgetByNumber(w.classification, w.number, widgetIndex);
914 }
915 }
916
917 /**
918 *

Callers 1

InputScrollContinueFunction · 0.85

Calls 4

GetWindowManagerFunction · 0.85
widgetScrollUpdateThumbsFunction · 0.85
FindByNumberMethod · 0.45

Tested by

no test coverage detected