From 0081a7581c3aca723c33fe60a2ee29af3f1fbd3d Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Fri, 11 Jul 2014 14:41:42 +0200 Subject: [PATCH 1/7] Implemented scrollbar buttons left, right, up, down input_hscrollbar_leftbutton, input_hscrollbar_rightbutton, input_vscrollbar_topbutton, input_vscrollbar_bottombutton --- src/game.c | 198 +++++++++++++++++++++++++++++++++++++++++++++++++-- src/window.h | 2 +- 2 files changed, 195 insertions(+), 5 deletions(-) diff --git a/src/game.c b/src/game.c index f6142643ed..181d56f37b 100644 --- a/src/game.c +++ b/src/game.c @@ -680,6 +680,195 @@ static void RCT2_CALLPROC_WE_MOUSE_DOWN(int address, int widgetIndex, rct_windo #endif } +/** + * Horizontal scrollbar's "left" button held down, scroll it to the left + * rct2: 0x006E9A60 + */ +static void input_hscrollbar_leftbutton(rct_window* w) +{ + rct_windowclass windowClass; + rct_windownumber windowNumber; + rct_window* w2; + rct_widget* widget; + rct_scroll* scroll; + uint16 widgetIndex; + sint16 left; + + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass); + windowNumber = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber); + w2 = window_find_by_id(windowClass, windowNumber); + + if (w2 == NULL) + return; + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16); + + widget = &w->widgets[widgetIndex]; + scroll = w->scrolls + RCT2_GLOBAL(0x009DE54C, uint32); + + left = scroll->h_left; + left -= 3; + if (left < 0) + left = 0; + scroll->h_left = left; + + widget_scroll_update_thumbs(w, widgetIndex); + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint8); + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, uint8); + windowClass |= 0x80; + + window_invalidate_by_id(widgetIndex, windowClass); +} + + +/** + * Horizontal scrollbar's "right" button held down, scroll it to the right + * rct2: 0x006E9ABF + */ +static void input_hscrollbar_rightbutton(rct_window* w) +{ + rct_windowclass windowClass; + rct_windownumber windowNumber; + rct_window* w2; + rct_widget* widget; + rct_scroll* scroll; + uint16 widgetIndex; + sint16 left, widgetWidth; + + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass); + windowNumber = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber); + w2 = window_find_by_id(windowClass, windowNumber); + + if (w2 == NULL) + return; + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16); + + widget = &w->widgets[widgetIndex]; + scroll = w->scrolls + RCT2_GLOBAL(0x009DE54C, uint32); + + left = scroll->h_left; + left += 3; + + widgetWidth = widget->right - widget->left - 1; + if (scroll->flags & 0x0010) { + widgetWidth -= 11; + } + widgetWidth *= -1; + widgetWidth += scroll->h_right; + if (widgetWidth < 0) { + widgetWidth = 0; + } + if (left > widgetWidth) { + left = widgetWidth; + } + + scroll->h_left = left; + + widget_scroll_update_thumbs(w, widgetIndex); + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint8); + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, uint8); + windowClass |= 0x80; + + window_invalidate_by_id(widgetIndex, windowClass); +} + +/** + * Vertical scrollbar's "top" button held down, scroll it upwards + * rct2: 0x006E9C37 + */ +static void input_vscrollbar_topbutton(rct_window* w) +{ + rct_windowclass windowClass; + rct_windownumber windowNumber; + rct_window* w2; + rct_widget* widget; + rct_scroll* scroll; + uint16 widgetIndex; + sint16 top; + + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass); + windowNumber = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber); + w2 = window_find_by_id(windowClass, windowNumber); + + if (w2 == NULL) + return; + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16); + + widget = &w->widgets[widgetIndex]; + scroll = w->scrolls + RCT2_GLOBAL(0x009DE54C, uint32); + + top = scroll->v_top; + top -= 3; + if (top < 0) + top = 0; + scroll->v_top = top; + + widget_scroll_update_thumbs(w, widgetIndex); + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint8); + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, uint8); + windowClass |= 0x80; + + window_invalidate_by_id(widgetIndex, windowClass); +} + +/** +* Vertical scrollbar's "bottom" button held down, scroll it downwards +* rct2: 0x006E9C96 +*/ +static void input_vscrollbar_bottombutton(rct_window* w) +{ + rct_windowclass windowClass; + rct_windownumber windowNumber; + rct_window* w2; + rct_widget* widget; + rct_scroll* scroll; + uint16 widgetIndex; + sint16 top, widgetHeight; + + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass); + windowNumber = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber); + w2 = window_find_by_id(windowClass, windowNumber); + + if (w2 == NULL) + return; + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16); + + widget = &w->widgets[widgetIndex]; + scroll = w->scrolls + RCT2_GLOBAL(0x009DE54C, uint32); + + top = scroll->v_top; + top += 3; + + widgetHeight = widget->bottom - widget->top - 1; + if (scroll->flags & 0x0001) { + widgetHeight -= 11; + } + widgetHeight *= -1; + widgetHeight += scroll->v_bottom; + if (widgetHeight < 0) { + widgetHeight = 0; + } + if (top > widgetHeight) { + top = widgetHeight; + } + + scroll->v_top = top; + + widget_scroll_update_thumbs(w, widgetIndex); + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint8); + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, uint8); + windowClass |= 0x80; + + window_invalidate_by_id(widgetIndex, windowClass); +} + /** * * rct2: 0x006E95F9 @@ -760,6 +949,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_CURSOR_Y, uint16) = y; int eax, ebx, ecx, edx; + edx = 0; // safety widget_scroll_get_part(w, widget, x, y, &eax, &ebx, &ecx, &edx); RCT2_GLOBAL(0x009DE548, uint16) = ecx; @@ -771,11 +961,11 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) break; case SCROLL_PART_HSCROLLBAR_LEFT: // 0x006E9A60 - RCT2_CALLPROC_X(0x006E9A60, 0, 0, 0, 0, (int)w, 0, 0); + input_hscrollbar_leftbutton(w); break; case SCROLL_PART_HSCROLLBAR_RIGHT: // 0x006E9ABF - RCT2_CALLPROC_X(0x006E9ABF, 0, 0, 0, 0, (int)w, 0, 0); + input_hscrollbar_rightbutton(w); break; case SCROLL_PART_HSCROLLBAR_LEFT_TROUGH: // 0x006E9B47 @@ -787,11 +977,11 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) break; case SCROLL_PART_VSCROLLBAR_TOP: // 0x006E9C37 - RCT2_CALLPROC_X(0x006E9C37, 0, 0, 0, 0, (int)w, 0, 0); + input_vscrollbar_topbutton(w); break; case SCROLL_PART_VSCROLLBAR_BOTTOM: // 0x006E9C96 - RCT2_CALLPROC_X(0x006E9C96, 0, 0, 0, 0, (int)w, 0, 0); + input_vscrollbar_bottombutton(w); break; case SCROLL_PART_VSCROLLBAR_TOP_TROUGH: // 0x006E9D1E diff --git a/src/window.h b/src/window.h index c04c34655f..c12fd95269 100644 --- a/src/window.h +++ b/src/window.h @@ -168,7 +168,7 @@ typedef enum { WE_SCROLL_MOUSEOVER = 18, WE_TEXT_INPUT = 19, WE_UNKNOWN_14 = 20, - WE_UNKNOWN_15 = 21, + WE_UNKNOWN_15 = 21, // scroll mouse move? WE_TOOLTIP = 22, WE_UNKNOWN_17 = 23, // tooltip related WE_UNKNOWN_18 = 24, From 3bca6b699abcb16fa05067c99398b3a5d875e8e1 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Fri, 11 Jul 2014 21:21:17 +0200 Subject: [PATCH 2/7] Implemented input_hscrollbar_left_trough --- src/game.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index 181d56f37b..e460e2ec86 100644 --- a/src/game.c +++ b/src/game.c @@ -775,6 +775,51 @@ static void input_hscrollbar_rightbutton(rct_window* w) window_invalidate_by_id(widgetIndex, windowClass); } +/** + * Horizontal scrollbar's left trough was clicked + * rct2: 0x006E9B47 + */ +static void input_hscrollbar_left_trough(rct_window* w) +{ + rct_windowclass windowClass; + rct_windownumber windowNumber; + rct_window* w2; + rct_widget* widget; + rct_scroll* scroll; + uint16 widgetIndex; + sint16 left, widgetWidth; + + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass); + windowNumber = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber); + w2 = window_find_by_id(windowClass, windowNumber); + + if (w2 == NULL) + return; + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16); + + widget = &w->widgets[widgetIndex]; + scroll = w->scrolls + RCT2_GLOBAL(0x009DE54C, uint32); + + left = scroll->h_left; + + widgetWidth = widget->right - widget->left - 1; + if (scroll->flags & 0x0010) + widgetWidth -= 11; + left -= widgetWidth; + if (left < 0) + left = 0; + scroll->h_left = left; + + widget_scroll_update_thumbs(w, widgetIndex); + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint8); + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, uint8); + windowClass |= 0x80; + + window_invalidate_by_id(widgetIndex, windowClass); +} + /** * Vertical scrollbar's "top" button held down, scroll it upwards * rct2: 0x006E9C37 @@ -969,7 +1014,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) break; case SCROLL_PART_HSCROLLBAR_LEFT_TROUGH: // 0x006E9B47 - RCT2_CALLPROC_X(0x006E9B47, 0, 0, 0, 0, (int)w, 0, 0); + input_hscrollbar_left_trough(w); break; case SCROLL_PART_HSCROLLBAR_RIGHT_TROUGH: // 0x006E9BB7 From f3caea6bae94b3cf82da4ad92fbfe723dcebf020 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Fri, 11 Jul 2014 21:22:26 +0200 Subject: [PATCH 3/7] Some consistency cleanup --- src/game.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/game.c b/src/game.c index e460e2ec86..3efdc05b3e 100644 --- a/src/game.c +++ b/src/game.c @@ -752,17 +752,14 @@ static void input_hscrollbar_rightbutton(rct_window* w) left += 3; widgetWidth = widget->right - widget->left - 1; - if (scroll->flags & 0x0010) { + if (scroll->flags & 0x0010) widgetWidth -= 11; - } widgetWidth *= -1; widgetWidth += scroll->h_right; - if (widgetWidth < 0) { + if (widgetWidth < 0) widgetWidth = 0; - } - if (left > widgetWidth) { + if (left > widgetWidth) left = widgetWidth; - } scroll->h_left = left; @@ -891,17 +888,14 @@ static void input_vscrollbar_bottombutton(rct_window* w) top += 3; widgetHeight = widget->bottom - widget->top - 1; - if (scroll->flags & 0x0001) { + if (scroll->flags & 0x0001) widgetHeight -= 11; - } widgetHeight *= -1; widgetHeight += scroll->v_bottom; - if (widgetHeight < 0) { + if (widgetHeight < 0) widgetHeight = 0; - } - if (top > widgetHeight) { + if (top > widgetHeight) top = widgetHeight; - } scroll->v_top = top; From e01cce49189e0afe6afcb1c24391d09600479280 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Fri, 11 Jul 2014 21:36:11 +0200 Subject: [PATCH 4/7] Implemented input_hscrollbar_right_trough --- src/game.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index 3efdc05b3e..4135362d5c 100644 --- a/src/game.c +++ b/src/game.c @@ -817,6 +817,56 @@ static void input_hscrollbar_left_trough(rct_window* w) window_invalidate_by_id(widgetIndex, windowClass); } +/** + * Horizontal scrollbar's right trough was clicked + * rct2: 0x006E9BB7 + */ +static void input_hscrollbar_right_trough(rct_window* w) +{ + rct_windowclass windowClass; + rct_windownumber windowNumber; + rct_window* w2; + rct_widget* widget; + rct_scroll* scroll; + uint16 widgetIndex; + sint16 left, widgetWidth; + + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass); + windowNumber = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber); + w2 = window_find_by_id(windowClass, windowNumber); + + if (w2 == NULL) + return; + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16); + + widget = &w->widgets[widgetIndex]; + scroll = w->scrolls + RCT2_GLOBAL(0x009DE54C, uint32); + + left = scroll->h_left; + + widgetWidth = widget->right - widget->left - 1; + if (scroll->flags & 0x0010) + widgetWidth -= 11; + left += widgetWidth; + widgetWidth *= -1; + widgetWidth += scroll->h_right; + if (widgetWidth < 0) + widgetWidth = 0; + if (left > widgetWidth) + left = widgetWidth; + + scroll->h_left = left; + + widget_scroll_update_thumbs(w, widgetIndex); + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint8); + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, uint8); + windowClass |= 0x80; + + window_invalidate_by_id(widgetIndex, windowClass); +} + /** * Vertical scrollbar's "top" button held down, scroll it upwards * rct2: 0x006E9C37 @@ -1012,7 +1062,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) break; case SCROLL_PART_HSCROLLBAR_RIGHT_TROUGH: // 0x006E9BB7 - RCT2_CALLPROC_X(0x006E9BB7, 0, 0, 0, 0, (int)w, 0, 0); + input_hscrollbar_right_trough(w); break; case SCROLL_PART_VSCROLLBAR_TOP: // 0x006E9C37 From e691f867800a892ecee23ed211966ac4577f55d0 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Fri, 11 Jul 2014 21:39:54 +0200 Subject: [PATCH 5/7] Implemented input_vscrollbar_top_trough --- src/game.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index 4135362d5c..b1495bf40b 100644 --- a/src/game.c +++ b/src/game.c @@ -958,6 +958,51 @@ static void input_vscrollbar_bottombutton(rct_window* w) window_invalidate_by_id(widgetIndex, windowClass); } +/** +* Vertical scrollbar's top trough was clicked +* rct2: 0x006E9D1E +*/ +static void input_vscrollbar_top_trough(rct_window* w) +{ + rct_windowclass windowClass; + rct_windownumber windowNumber; + rct_window* w2; + rct_widget* widget; + rct_scroll* scroll; + uint16 widgetIndex; + sint16 top, widgetHeight; + + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass); + windowNumber = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber); + w2 = window_find_by_id(windowClass, windowNumber); + + if (w2 == NULL) + return; + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16); + + widget = &w->widgets[widgetIndex]; + scroll = w->scrolls + RCT2_GLOBAL(0x009DE54C, uint32); + + top = scroll->v_top; + + widgetHeight = widget->bottom - widget->top - 1; + if (scroll->flags & 0x0001) + widgetHeight -= 11; + top -= widgetHeight; + if (top < 0) + top = 0; + scroll->v_top = top; + + widget_scroll_update_thumbs(w, widgetIndex); + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint8); + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, uint8); + windowClass |= 0x80; + + window_invalidate_by_id(widgetIndex, windowClass); +} + /** * * rct2: 0x006E95F9 @@ -1074,7 +1119,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) break; case SCROLL_PART_VSCROLLBAR_TOP_TROUGH: // 0x006E9D1E - RCT2_CALLPROC_X(0x006E9D1E, 0, 0, 0, 0, (int)w, 0, 0); + input_vscrollbar_top_trough(w); break; case SCROLL_PART_VSCROLLBAR_BOTTOM_TROUGH: // 0x006E9D8E From 4e7883f20b0be22337688827fb265cb1ce906443 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Fri, 11 Jul 2014 21:43:51 +0200 Subject: [PATCH 6/7] Implemented input_vscrollbar_bottom_trough --- src/game.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index b1495bf40b..a6e8532132 100644 --- a/src/game.c +++ b/src/game.c @@ -1003,6 +1003,56 @@ static void input_vscrollbar_top_trough(rct_window* w) window_invalidate_by_id(widgetIndex, windowClass); } +/** +* Vertical scrollbar's bottom trough was clicked +* rct2: 0x006E9D8E +*/ +static void input_vscrollbar_bottom_trough(rct_window* w) +{ + rct_windowclass windowClass; + rct_windownumber windowNumber; + rct_window* w2; + rct_widget* widget; + rct_scroll* scroll; + uint16 widgetIndex; + sint16 top, widgetHeight; + + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass); + windowNumber = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber); + w2 = window_find_by_id(windowClass, windowNumber); + + if (w2 == NULL) + return; + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16); + + widget = &w->widgets[widgetIndex]; + scroll = w->scrolls + RCT2_GLOBAL(0x009DE54C, uint32); + + top = scroll->v_top; + + widgetHeight = widget->bottom - widget->top - 1; + if (scroll->flags & 0x0001) + widgetHeight -= 11; + top += widgetHeight; + widgetHeight *= -1; + widgetHeight += scroll->v_bottom; + if (widgetHeight < 0) + widgetHeight = 0; + if (top > widgetHeight) + top = widgetHeight; + + scroll->v_top = top; + + widget_scroll_update_thumbs(w, widgetIndex); + + widgetIndex = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint8); + windowClass = RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, uint8); + windowClass |= 0x80; + + window_invalidate_by_id(widgetIndex, windowClass); +} + /** * * rct2: 0x006E95F9 @@ -1123,7 +1173,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) break; case SCROLL_PART_VSCROLLBAR_BOTTOM_TROUGH: // 0x006E9D8E - RCT2_CALLPROC_X(0x006E9D8E, 0, 0, 0, 0, (int)w, 0, 0); + input_vscrollbar_bottom_trough(w); break; } break; From 3e30e147cffa3bb18f8dfbc8b5a2983df474f715 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Fri, 11 Jul 2014 21:49:01 +0200 Subject: [PATCH 7/7] Formatting --- src/game.c | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/src/game.c b/src/game.c index a6e8532132..65b25027f6 100644 --- a/src/game.c +++ b/src/game.c @@ -1143,38 +1143,14 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) case SCROLL_PART_VIEW: RCT2_CALLPROC_X(w->event_handlers[WE_SCROLL_MOUSEDOWN], edx / sizeof(rct_scroll), ebx, eax, ebx, (int)w, (int)widget, 0); break; - case SCROLL_PART_HSCROLLBAR_LEFT: - // 0x006E9A60 - input_hscrollbar_leftbutton(w); - break; - case SCROLL_PART_HSCROLLBAR_RIGHT: - // 0x006E9ABF - input_hscrollbar_rightbutton(w); - break; - case SCROLL_PART_HSCROLLBAR_LEFT_TROUGH: - // 0x006E9B47 - input_hscrollbar_left_trough(w); - break; - case SCROLL_PART_HSCROLLBAR_RIGHT_TROUGH: - // 0x006E9BB7 - input_hscrollbar_right_trough(w); - break; - case SCROLL_PART_VSCROLLBAR_TOP: - // 0x006E9C37 - input_vscrollbar_topbutton(w); - break; - case SCROLL_PART_VSCROLLBAR_BOTTOM: - // 0x006E9C96 - input_vscrollbar_bottombutton(w); - break; - case SCROLL_PART_VSCROLLBAR_TOP_TROUGH: - // 0x006E9D1E - input_vscrollbar_top_trough(w); - break; - case SCROLL_PART_VSCROLLBAR_BOTTOM_TROUGH: - // 0x006E9D8E - input_vscrollbar_bottom_trough(w); - break; + case SCROLL_PART_HSCROLLBAR_LEFT: input_hscrollbar_leftbutton(w); break; + case SCROLL_PART_HSCROLLBAR_RIGHT: input_hscrollbar_rightbutton(w); break; + case SCROLL_PART_HSCROLLBAR_LEFT_TROUGH: input_hscrollbar_left_trough(w); break; + case SCROLL_PART_HSCROLLBAR_RIGHT_TROUGH: input_hscrollbar_right_trough(w); break; + case SCROLL_PART_VSCROLLBAR_TOP: input_vscrollbar_topbutton(w); break; + case SCROLL_PART_VSCROLLBAR_BOTTOM: input_vscrollbar_bottombutton(w); break; + case SCROLL_PART_VSCROLLBAR_TOP_TROUGH: input_vscrollbar_top_trough(w); break; + case SCROLL_PART_VSCROLLBAR_BOTTOM_TROUGH: input_vscrollbar_bottom_trough(w); break; } break; default: