From: Ricardo Cruz Date: Tue, 29 Jun 2004 17:47:36 +0000 (+0000) Subject: Added hidden state to mouse cursor. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=895194f150b4c202781cccfc0ce9ec5968f1cb2a;p=supertux.git Added hidden state to mouse cursor. Also forgot to free gray text when added it. Shame on me! :) SVN-Revision: 1522 --- diff --git a/src/mousecursor.cpp b/src/mousecursor.cpp index 177f2f746..86eb8ca55 100644 --- a/src/mousecursor.cpp +++ b/src/mousecursor.cpp @@ -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; diff --git a/src/mousecursor.h b/src/mousecursor.h index a35b96cb2..11557b5f8 100644 --- a/src/mousecursor.h +++ b/src/mousecursor.h @@ -31,7 +31,8 @@ enum { MC_NORMAL, MC_CLICK, - MC_LINK + MC_LINK, + MC_HIDE }; class MouseCursor diff --git a/src/setup.cpp b/src/setup.cpp index da650e235..719a517ac 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -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;