ActionPopup.hh

00001 /*
00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003 **
00004 ** Copyright (C) 2006 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 ACTIONPOPUP_HH_
00018 # define ACTIONPOPUP_HH_
00019 
00020 # include "VirtualSurface.hh"
00021 # include "Sprite.hh"
00022 
00023 class Api;
00024 
00025 BEGIN_NS(sdlvisu);
00026 
00027 # define POPUP_ITEM_HEIGHT 40
00028 # define POPUP_ITEM_WIDTH 120
00029 
00032 enum eDeclarationsImageIndex {
00033   DCLII_MOVE = 0,
00034   DCLII_BLITZ,
00035   DCLII_BLOCK,
00036   DCLII_PASS,
00037 
00038   DCLII_NB
00039 };
00040 
00043 enum eActionsImageIndex {
00044   ACTII_MOVE = 0,
00045   ACTII_GOFORIT,
00046   ACTII_BLOCK,
00047   ACTII_GATHER,
00048   ACTII_THROW,
00049   ACTII_AGGRESS,
00050   ACTII_BLITZ,
00051   ACTII_ROLLOVER,
00052   ACTII_STANDUP,
00053   ACTII_TRANSMIT,
00054   ACTII_THROWTM,
00055   ACTII_LEAP,
00056 
00057   ACTII_NB
00058 };
00059 
00060 class VisuPlayer;
00061 class Game;
00062 
00067 class ActionPopup : public VirtualSurface
00068 {
00069 public:
00070   ActionPopup(Game& g);
00071   virtual ~ActionPopup();
00072 
00073   void prepareDeclareMenu(VisuPlayer* vp);
00074   void prepareActionMenu(enum eDeclaredAction dcl);
00075   void dissociateFromPlayer();
00076 
00077   virtual void show();
00078   virtual void hide();
00079   
00080   virtual void update();
00081 
00082 private:
00083   Api*      api_;
00084   Game&     game_;
00085 
00086   VisuPlayer*   vp_;
00087   Sprite    act_sprite_[ACTII_NB];    
00088   Sprite    act_sprite_on_[ACTII_NB]; 
00089   Sprite    dcl_sprite_[DCLII_NB];    
00090   Sprite    dcl_sprite_on_[DCLII_NB]; 
00091   int     displayed_items_[DCLII_NB + ACTII_NB]; 
00092   int     displayed_items_nb_;  
00093   bool    isDeclarationsMenu;   
00094 };
00095 
00096 END_NS(sdlvisu);
00097 
00098 #endif /* !ACTIONPOPUP_HH_ */

Generated on Sat Jun 23 16:07:22 2007 for Stechec/TBT by  doxygen 1.4.7