summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-05-30 10:36:32 +0000
committeralberth <alberth@openttd.org>2010-05-30 10:36:32 +0000
commitfc82d9cd77224c458c05ce2fd749e58e9cee5299 (patch)
treeb6beb1ae25c88d0944e3e4b88a2742a116129e73
parent13ec4bde4cc6d274dae3ce590de22eb41a02e0d5 (diff)
downloadopenttd-fc82d9cd77224c458c05ce2fd749e58e9cee5299.tar.xz
(svn r19903) -Codechange: Use SpecialMouseMode enum as type of _special_mouse_mode.
-rw-r--r--src/window.cpp2
-rw-r--r--src/window_gui.h11
2 files changed, 7 insertions, 6 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 9fa5655ae..117244988 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -59,7 +59,7 @@ byte _scroller_click_timeout;
bool _scrolling_scrollbar;
bool _scrolling_viewport;
-byte _special_mouse_mode;
+SpecialMouseMode _special_mouse_mode; ///< Mode of the mouse.
/** Window description constructor. */
WindowDesc::WindowDesc(WindowPosition def_pos, int16 def_width, int16 def_height,
diff --git a/src/window_gui.h b/src/window_gui.h
index 55a223581..68fbfc90e 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -913,13 +913,14 @@ extern byte _scroller_click_timeout;
extern bool _scrolling_scrollbar;
extern bool _scrolling_viewport;
-extern byte _special_mouse_mode;
+/** Mouse modes. */
enum SpecialMouseMode {
- WSM_NONE = 0,
- WSM_DRAGDROP = 1,
- WSM_SIZING = 2,
- WSM_PRESIZE = 3,
+ WSM_NONE, ///< No special mouse mode.
+ WSM_DRAGDROP, ///< Dragging an object.
+ WSM_SIZING, ///< Sizing mode.
+ WSM_PRESIZE, ///< Presizing mode (docks, tunnels).
};
+extern SpecialMouseMode _special_mouse_mode;
Window *GetCallbackWnd();