comparison window/system.cc @ 54:d7cde171a1de

* scn2k_grp.cc now handles commands in a cleanier way \o/ * some cleaning
author thib
date Mon, 20 Apr 2009 16:18:55 +0000
parents 15a18fbe6f21
children 4416cfac86ae
comparison
equal deleted inserted replaced
53:ddbcbd000206 54:d7cde171a1de
94 SDL_Delay(0); 94 SDL_Delay(0);
95 } 95 }
96 } 96 }
97 97
98 void Main::SetCursor(Surface* s, const Rect& r) { 98 void Main::SetCursor(Surface* s, const Rect& r) {
99 if (instance == 0) return; 99 if (instance == NULL) return;
100 if (instance->cursor) delete instance->cursor; 100 if (instance->cursor) delete instance->cursor;
101 if (s == 0) { // カーソル消去 101 if (s == NULL) { // カーソル消去
102 instance->cursor = 0; 102 instance->cursor = NULL;
103 } else if (s == DEFAULT_MOUSECURSOR) { 103 } else if (s == DEFAULT_MOUSECURSOR) {
104 instance->cursor = 0; 104 instance->cursor = NULL;
105 SDL_ShowCursor(SDL_ENABLE); 105 SDL_ShowCursor(SDL_ENABLE);
106 } else { 106 } else {
107 instance->cursor = new WidMouseCursor(instance->event, instance->root.root, s, r.lx, r.ty, r.width(), r.height()); 107 instance->cursor = new WidMouseCursor(instance->event, instance->root.root, s, r.lx, r.ty, r.width(), r.height());
108 instance->cursor->show(); 108 instance->cursor->show();
109 SDL_ShowCursor(SDL_DISABLE); 109 SDL_ShowCursor(SDL_DISABLE);