CmdButton.hh
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CMDBUTTON_HH_
00018 # define CMDBUTTON_HH_
00019
00020 # include "Game.hh"
00021 # include "TextSurface.hh"
00022 # include "VirtualSurface.hh"
00023
00024 BEGIN_NS(sdlvisu);
00025
00031 class CmdButton
00032 {
00033 public:
00035 CmdButton(Panel& panel, Game& game, enum eVisuGameCommand cmd);
00036 ~CmdButton();
00037
00038 bool isClicked();
00039
00040 void enable();
00041 void disable();
00042 void setEnabled(bool enabled);
00043 void updateStatus();
00044
00045 private:
00046 Panel& panel_;
00047 Game& game_;
00048 enum eVisuGameCommand cmd_;
00049
00050 TextSurface letter_;
00051 TextSurface text_;
00052
00053 bool is_being_pressed_;
00054 bool is_rolled_over_;
00055 bool is_enabled_;
00056 bool is_clicked_;
00057 };
00058
00059 END_NS(sdlvisu);
00060
00061 #endif