diff options
author | rubidium <rubidium@openttd.org> | 2008-05-29 15:13:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-29 15:13:28 +0000 |
commit | 923e21129c94c36bb403e955a1f334ef34722e8b (patch) | |
tree | 59059f0a1aba0794fa770e8c9a19312e4ce300af /src/window.cpp | |
parent | 2a816fb685b373e38347f809bcdc7f2fdef0139c (diff) | |
download | openttd-923e21129c94c36bb403e955a1f334ef34722e8b.tar.xz |
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/window.cpp b/src/window.cpp index 3a150f059..52538c877 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1219,11 +1219,11 @@ static bool HandleWindowDragging() int nx = x; int ny = y; - if (_settings.gui.window_snap_radius != 0) { + if (_settings_client.gui.window_snap_radius != 0) { Window* const *vz; - int hsnap = _settings.gui.window_snap_radius; - int vsnap = _settings.gui.window_snap_radius; + int hsnap = _settings_client.gui.window_snap_radius; + int vsnap = _settings_client.gui.window_snap_radius; int delta; FOR_ALL_WINDOWS(vz) { @@ -1469,7 +1469,7 @@ static bool HandleScrollbarScrolling() static bool HandleViewportScroll() { - bool scrollwheel_scrolling = _settings.gui.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0); + bool scrollwheel_scrolling = _settings_client.gui.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0); if (!_scrolling_viewport) return true; @@ -1489,7 +1489,7 @@ static bool HandleViewportScroll() } Point delta; - if (_settings.gui.reverse_scroll) { + if (_settings_client.gui.reverse_scroll) { delta.x = -_cursor.delta.x; delta.y = -_cursor.delta.y; } else { @@ -1669,7 +1669,7 @@ static void HandleAutoscroll() return; } - if (_settings.gui.autoscroll && _game_mode != GM_MENU && !IsGeneratingWorld()) { + if (_settings_client.gui.autoscroll && _game_mode != GM_MENU && !IsGeneratingWorld()) { int x = _cursor.pos.x; int y = _cursor.pos.y; Window *w = FindWindowFromPt(x, y); @@ -1771,7 +1771,7 @@ void MouseLoop(MouseClick click, int mousewheel) if (!HandleMouseOver()) return; if (!HandleKeyScrolling()) return; - bool scrollwheel_scrolling = _settings.gui.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0); + bool scrollwheel_scrolling = _settings_client.gui.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0); if (click == MC_NONE && mousewheel == 0 && !scrollwheel_scrolling) return; int x = _cursor.pos.x; @@ -1786,7 +1786,7 @@ void MouseLoop(MouseClick click, int mousewheel) if (vp != NULL && (_game_mode == GM_MENU || IsGeneratingWorld())) return; if (mousewheel != 0) { - if (_settings.gui.scrollwheel_scrolling == 0) { + if (_settings_client.gui.scrollwheel_scrolling == 0) { /* Send mousewheel event to window */ w->OnMouseWheel(mousewheel); } @@ -2117,7 +2117,7 @@ int PositionMainToolbar(Window *w) w = FindWindowById(WC_MAIN_TOOLBAR, 0); } - switch (_settings.gui.toolbar_pos) { + switch (_settings_client.gui.toolbar_pos) { case 1: w->left = (_screen.width - w->width) / 2; break; case 2: w->left = _screen.width - w->width; break; default: w->left = 0; |