brewpanel/sdlgui.c

changeset 415
d9b7e0705f56
parent 412
f1a042a59b61
child 420
644a6106d712
equal deleted inserted replaced
414:0fa885045e20 415:d9b7e0705f56
221 221
222 222
223 /* 223 /*
224 * Draw the cursor 224 * Draw the cursor
225 */ 225 */
226 void SDLGui_Cursor(int x, int y) 226 void SDLGui_Cursor(int x, int y, int on, int blink)
227 { 227 {
228 SDL_Rect dr; 228 SDL_Rect dr;
229 Uint32 color = SDL_MapRGB(pSdlGuiScrn->format, 53, 59, 61); 229 Uint32 color = SDL_MapRGB(pSdlGuiScrn->format, 53, 59, 61);
230 230
231 dr.x=x; 231 if (on) {
232 dr.y=y; 232 dr.x = x;
233 dr.w=fontwidth; 233 dr.y = y + fontheight - 2;
234 dr.h=fontheight; 234 dr.w = fontwidth;
235 235 dr.h = 2;
236 SDL_FillRect(pSdlGuiScrn, &dr, color); 236
237 SDL_UpdateRect(pSdlGuiScrn, x, y, fontwidth, fontheight); 237 SDL_FillRect(pSdlGuiScrn, &dr, color);
238 SDL_UpdateRect(pSdlGuiScrn, x, y, fontwidth, fontheight);
239 }
238 } 240 }
239 241
240 242
241 243
242 /* 244 /*

mercurial