1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 13:09:15 +00:00

(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.

This commit is contained in:
Darkvater
2006-03-24 00:42:35 +00:00
parent 10936e7034
commit ea1adebe31
5 changed files with 76 additions and 9 deletions

19
gfx.h
View File

@@ -21,17 +21,18 @@ struct DrawPixelInfo {
typedef struct CursorVars {
Point pos, size, offs, delta;
Point draw_pos, draw_size;
CursorID sprite;
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;
uint animate_timeout;
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;
bool dirty;
bool fix_at;
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;