diff options
author | rubidium <rubidium@openttd.org> | 2008-05-29 11:13:11 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-29 11:13:11 +0000 |
commit | 4151d684803ad353ae9e3362f1d855ba95027728 (patch) | |
tree | a33e06e83fac9f119628ba46239c00d64af51b3c /src | |
parent | 4a3dd3758235d7d6b85bf10fb2d1c9f10dcbb7a8 (diff) | |
download | openttd-4151d684803ad353ae9e3362f1d855ba95027728.tar.xz |
(svn r13322) -Codechange: _no_scroll belongs more with the window code.
Diffstat (limited to 'src')
-rw-r--r-- | src/openttd.cpp | 1 | ||||
-rw-r--r-- | src/openttd.h | 11 | ||||
-rw-r--r-- | src/window.cpp | 1 | ||||
-rw-r--r-- | src/window_gui.h | 15 |
4 files changed, 16 insertions, 12 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index bd386f5bf..9a8afbcef 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -347,7 +347,6 @@ static void LoadIntroGame() if (_music_driver->IsSongPlaying()) ResetMusic(); } -byte _no_scroll; byte _savegame_sort_order; #if defined(UNIX) && !defined(__MORPHOS__) extern void DedicatedFork(); diff --git a/src/openttd.h b/src/openttd.h index a603a62e8..7f61ca62e 100644 --- a/src/openttd.h +++ b/src/openttd.h @@ -39,17 +39,6 @@ enum { DO_WAYPOINTS = 6, }; -/* In certain windows you navigate with the arrow keys. Do not scroll the - * gameview when here. Bitencoded variable that only allows scrolling if all - * elements are zero */ -enum { - SCROLL_CON = 0, - SCROLL_EDIT = 1, - SCROLL_SAVE = 2, - SCROLL_CHAT = 4, -}; -extern byte _no_scroll; - extern byte _game_mode; extern bool _exit_game; extern int8 _pause_game; diff --git a/src/window.cpp b/src/window.cpp index c79b436ec..3a150f059 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -37,6 +37,7 @@ static Window *_mouseover_last_w = NULL; ///< Window of the last MOUSEOVER event Window *_z_windows[MAX_NUMBER_OF_WINDOWS]; Window **_last_z_window; ///< always points to the next free space in the z-array +byte _no_scroll; Point _cursorpos_drag_start; int _scrollbar_start_pos; diff --git a/src/window_gui.h b/src/window_gui.h index 020f5797a..a499ae1e5 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -536,6 +536,21 @@ extern Window *_z_windows[]; extern Window **_last_z_window; #define FOR_ALL_WINDOWS(wz) for (wz = _z_windows; wz != _last_z_window; wz++) +/** + * In certain windows you navigate with the arrow keys. Do not scroll the + * gameview when here. Bitencoded variable that only allows scrolling if all + * elements are zero + */ +enum { + SCROLL_CON = 0, + SCROLL_EDIT = 1, + SCROLL_SAVE = 2, + SCROLL_CHAT = 4, +}; + +/** Disable scrolling of the main viewport when an input-window is active. */ +extern byte _no_scroll; + extern Point _cursorpos_drag_start; extern int _scrollbar_start_pos; |