Added hidden state to mouse cursor.
authorRicardo Cruz <rick2@aeiou.pt>
Tue, 29 Jun 2004 17:47:36 +0000 (17:47 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Tue, 29 Jun 2004 17:47:36 +0000 (17:47 +0000)
Also forgot to free gray text when added it. Shame on me! :)

SVN-Revision: 1522

src/mousecursor.cpp
src/mousecursor.h
src/setup.cpp

index 177f2f7..86eb8ca 100644 (file)
@@ -61,6 +61,9 @@ void MouseCursor::set_mid(int x, int y)
 
 void MouseCursor::draw(DrawingContext& context)
 {
+  if(cur_state == MC_HIDE)
+    return;
+
   int x,y,w,h;
   Uint8 ispressed = SDL_GetMouseState(&x,&y);
   w = cursor->w / tot_frames;
index a35b96c..11557b5 100644 (file)
@@ -31,7 +31,8 @@
 enum {
   MC_NORMAL,
   MC_CLICK,
-  MC_LINK
+  MC_LINK,
+  MC_HIDE
 };
 
 class MouseCursor
index da650e2..719a517 100644 (file)
@@ -619,6 +619,7 @@ void st_general_free(void)
   delete gold_text;
   delete white_text;
   delete blue_text;
+  delete gray_text;
   delete white_small_text;
   delete white_big_text;
   delete yellow_nums;