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
commitea1adebe31673917c957f455d3588b6486142128 (patch)
treef10f7be93e3ce5d8a676824b0bec3535d8c3dfe6 /gfx.h
parent10936e70345e4d462517e35511f0e56b69c444e9 (diff)
downloadopenttd-ea1adebe31673917c957f455d3588b6486142128.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;