diff options
author | frosch <frosch@openttd.org> | 2016-08-15 18:30:50 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2016-08-15 18:30:50 +0000 |
commit | f7a0ee9a158d4fad242e87b19f036908b43e9f30 (patch) | |
tree | 6e28174a65dc2621c515824dd48965a8638414fa /src | |
parent | 1c1ba859eb7be52e8aa727eef52f6e8a51fc2e1a (diff) | |
download | openttd-f7a0ee9a158d4fad242e87b19f036908b43e9f30.tar.xz |
(svn r27625) -Doc: CursorVars
Diffstat (limited to 'src')
-rw-r--r-- | src/gfx_type.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/gfx_type.h b/src/gfx_type.h index d25abff21..707887619 100644 --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -115,29 +115,34 @@ struct AnimCursor { /** Collection of variables for cursor-display and -animation */ struct CursorVars { - 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 - int short_vehicle_offset; ///< offset of the X for short vehicles - CursorID sprite; ///< current image of cursor - PaletteID pal; - - int wheel; ///< mouse wheel movement + /* Logical mouse position */ + Point pos; ///< logical mouse position + Point delta; ///< relative mouse movement in this tick + int wheel; ///< mouse wheel movement + bool fix_at; ///< mouse is moving, but cursor is not (used for scrolling) /* We need two different vars to keep track of how far the scrollwheel moved. * OSX uses this for scrolling around the map. */ int v_wheel; int h_wheel; + /* Mouse appearance */ + CursorID sprite; ///< current image of cursor + PaletteID pal; + Point size, offs; ///< sprite properties + Point draw_pos, draw_size; ///< position and size bounding-box for drawing + const AnimCursor *animate_list; ///< in case of animated cursor, list of frames const AnimCursor *animate_cur; ///< in case of animated cursor, current frame uint animate_timeout; ///< in case of animated cursor, number of ticks to show the current 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 + bool visible; ///< cursor is visible + bool dirty; ///< the rect occupied by the mouse is dirty (redraw) + bool in_window; ///< mouse inside this window, determines drawing logic - bool vehchain; ///< vehicle chain is dragged + /* Drag data */ + int short_vehicle_offset; ///< offset of the X for short vehicles + bool vehchain; ///< vehicle chain is dragged bool UpdateCursorPosition(int x, int y, bool queued_warp); |