* * rct2: 0x006E9ABF */
| 873 | * rct2: 0x006E9ABF |
| 874 | */ |
| 875 | static void InputScrollPartUpdateHRight(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id) |
| 876 | { |
| 877 | const auto& widget = w.widgets[widgetIndex]; |
| 878 | |
| 879 | auto* windowMgr = GetWindowManager(); |
| 880 | if (windowMgr->FindByNumber(w.classification, w.number) != nullptr) |
| 881 | { |
| 882 | auto& scroll = w.scrolls[scroll_id]; |
| 883 | scroll.flags |= HSCROLLBAR_RIGHT_PRESSED; |
| 884 | scroll.contentOffsetX += 3; |
| 885 | int32_t newLeft = widget.width() - 2; |
| 886 | if (scroll.flags & VSCROLLBAR_VISIBLE) |
| 887 | newLeft -= kScrollBarWidth + 1; |
| 888 | newLeft *= -1; |
| 889 | newLeft += scroll.contentWidth; |
| 890 | if (newLeft < 0) |
| 891 | newLeft = 0; |
| 892 | if (scroll.contentOffsetX > newLeft) |
| 893 | scroll.contentOffsetX = newLeft; |
| 894 | widgetScrollUpdateThumbs(w, widgetIndex); |
| 895 | windowMgr->InvalidateWidgetByNumber(w.classification, w.number, widgetIndex); |
| 896 | } |
| 897 | } |
| 898 | |
| 899 | /** |
| 900 | * |
no test coverage detected