CmdButton.hh

00001 /*
00002 ** TowBowlTactics, a turn-based strategy football game.
00003 **
00004 ** Copyright (C) 2010-2010 The TBT Team.
00005 **
00006 ** This program is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU General Public License
00008 ** as published by the Free Software Foundation; either version 2
00009 ** of the License, or (at your option) any later version.
00010 **
00011 ** The complete GNU General Public Licence Notice can be found as the
00012 ** `NOTICE' file in the root directory.
00013 **
00014 ** The TBT Team consists of people listed in the `AUTHORS' file.
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 /* !CMDBUTTON_HH_ */
Generated on Mon Apr 5 21:17:11 2010 for Stechec/TBT by  doxygen 1.6.3