110 Point draw_pos, draw_size; ///< position and size bounding-box for drawing |
111 Point draw_pos, draw_size; ///< position and size bounding-box for drawing |
111 SpriteID sprite; ///< current image of cursor |
112 SpriteID sprite; ///< current image of cursor |
112 SpriteID pal; |
113 SpriteID pal; |
113 |
114 |
114 int wheel; ///< mouse wheel movement |
115 int wheel; ///< mouse wheel movement |
|
116 |
|
117 /* We need two different vars to keep track of how far the scrollwheel moved. |
|
118 * OSX uses this for scrolling around the map. */ |
|
119 int v_wheel; |
|
120 int h_wheel; |
|
121 |
115 const AnimCursor *animate_list; ///< in case of animated cursor, list of frames |
122 const AnimCursor *animate_list; ///< in case of animated cursor, list of frames |
116 const AnimCursor *animate_cur; ///< in case of animated cursor, current frame |
123 const AnimCursor *animate_cur; ///< in case of animated cursor, current frame |
117 uint animate_timeout; ///< in case of animated cursor, number of ticks to show the current cursor |
124 uint animate_timeout; ///< in case of animated cursor, number of ticks to show the current cursor |
118 |
125 |
119 bool visible; ///< cursor is visible |
126 bool visible; ///< cursor is visible |
221 |
228 |
222 BoundingRect GetStringBoundingBox(const char *str); |
229 BoundingRect GetStringBoundingBox(const char *str); |
223 uint32 FormatStringLinebreaks(char *str, int maxw); |
230 uint32 FormatStringLinebreaks(char *str, int maxw); |
224 void LoadStringWidthTable(); |
231 void LoadStringWidthTable(); |
225 void DrawStringMultiCenter(int x, int y, StringID str, int maxw); |
232 void DrawStringMultiCenter(int x, int y, StringID str, int maxw); |
226 uint DrawStringMultiLine(int x, int y, StringID str, int maxw); |
233 uint DrawStringMultiLine(int x, int y, StringID str, int maxw, int maxh = -1); |
227 void DrawDirtyBlocks(); |
234 void DrawDirtyBlocks(); |
228 void SetDirtyBlocks(int left, int top, int right, int bottom); |
235 void SetDirtyBlocks(int left, int top, int right, int bottom); |
229 void MarkWholeScreenDirty(); |
236 void MarkWholeScreenDirty(); |
230 |
237 |
231 void GfxInitPalettes(); |
238 void GfxInitPalettes(); |