summaryrefslogtreecommitdiff
path: root/gfx.h
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-03-24 00:42:35 +0000
committerDarkvater <Darkvater@openttd.org>2006-03-24 00:42:35 +0000
commitfb48c3b4aa98540b03ef64410184547da70ea97c (patch)
treef10f7be93e3ce5d8a676824b0bec3535d8c3dfe6 /gfx.h
parent41f4c473dafd4cd1982d76cfb7b702426bb6067f (diff)
downloadopenttd-fb48c3b4aa98540b03ef64410184547da70ea97c.tar.xz
(svn r4075) - Feature: Undraw the mouse when it leaves the window and Draw it again when it enters. Added both for WIN32 and SDL. Since Win95 has troubles with TrackMouseEvent(), this function was just simply rewritten which was the easiest. Based on a patch by DmitryKo.
Diffstat (limited to 'gfx.h')
-rw-r--r--gfx.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/gfx.h b/gfx.h
index 66eb5eee1..4e605a24e 100644
--- a/gfx.h
+++ b/gfx.h
@@ -21,17 +21,18 @@ struct DrawPixelInfo {
typedef struct CursorVars {
- Point pos, size, offs, delta;
- Point draw_pos, draw_size;
- CursorID sprite;
-
- int wheel; // mouse wheel movement
- const CursorID *animate_list, *animate_cur;
- uint animate_timeout;
-
- bool visible;
- bool dirty;
- bool fix_at;
+ Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement
+ Point draw_pos, draw_size; ///< position and size bounding-box for drawing
+ CursorID sprite; ///< current image of cursor
+
+ int wheel; ///< mouse wheel movement
+ const CursorID *animate_list, *animate_cur; ///< in case of animated cursor, list of frames
+ uint animate_timeout; ///< current frame in list of animated cursor
+
+ bool visible; ///< cursor is visible
+ bool dirty; ///< the rect occupied by the mouse is dirty (redraw)
+ bool fix_at; ///< mouse is moving, but cursor is not (used for scrolling)
+ bool in_window; ///< mouse inside this window, determines drawing logic
} CursorVars;