* * rct2: 0x006E9C96 */
| 919 | * rct2: 0x006E9C96 |
| 920 | */ |
| 921 | static void InputScrollPartUpdateVBottom(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id) |
| 922 | { |
| 923 | const auto& widget = w.widgets[widgetIndex]; |
| 924 | |
| 925 | auto* windowMgr = GetWindowManager(); |
| 926 | if (windowMgr->FindByNumber(w.classification, w.number) != nullptr) |
| 927 | { |
| 928 | auto& scroll = w.scrolls[scroll_id]; |
| 929 | scroll.flags |= VSCROLLBAR_DOWN_PRESSED; |
| 930 | scroll.contentOffsetY += 3; |
| 931 | int32_t newTop = widget.height() - 2; |
| 932 | if (scroll.flags & HSCROLLBAR_VISIBLE) |
| 933 | newTop -= kScrollBarWidth + 1; |
| 934 | newTop *= -1; |
| 935 | newTop += scroll.contentHeight; |
| 936 | if (newTop < 0) |
| 937 | newTop = 0; |
| 938 | if (scroll.contentOffsetY > newTop) |
| 939 | scroll.contentOffsetY = newTop; |
| 940 | widgetScrollUpdateThumbs(w, widgetIndex); |
| 941 | windowMgr->InvalidateWidgetByNumber(w.classification, w.number, widgetIndex); |
| 942 | } |
| 943 | } |
| 944 | |
| 945 | #pragma endregion |
| 946 |
no test coverage detected