mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-28 14:44:28 +01:00
Codechange: Creating enum for 'scrollwheel_scrolling' setting
This commit is contained in:
committed by
rubidium42
parent
e8be933ee6
commit
c53ed9fad6
@@ -2352,7 +2352,7 @@ static EventState HandleActiveWidget()
|
||||
*/
|
||||
static EventState HandleViewportScroll()
|
||||
{
|
||||
bool scrollwheel_scrolling = _settings_client.gui.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0);
|
||||
bool scrollwheel_scrolling = _settings_client.gui.scrollwheel_scrolling == SWS_SCROLL_MAP && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0);
|
||||
|
||||
if (!_scrolling_viewport) return ES_NOT_HANDLED;
|
||||
|
||||
@@ -2776,7 +2776,7 @@ static void MouseLoop(MouseClick click, int mousewheel)
|
||||
|
||||
HandleMouseOver();
|
||||
|
||||
bool scrollwheel_scrolling = _settings_client.gui.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0);
|
||||
bool scrollwheel_scrolling = _settings_client.gui.scrollwheel_scrolling == SWS_SCROLL_MAP && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0);
|
||||
if (click == MC_NONE && mousewheel == 0 && !scrollwheel_scrolling) return;
|
||||
|
||||
int x = _cursor.pos.x;
|
||||
|
||||
Reference in New Issue
Block a user