summaryrefslogtreecommitdiff
diff options
context:
space:
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();