src/menu/teams_selection_box.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *  Wormux is a convivial mass murder game.
00003  *  Copyright (C) 2001-2004 Lawrence Azzoug.
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
00018  ******************************************************************************
00019  *  Teams selection box
00020  *****************************************************************************/
00021 
00022 #ifndef TEAMS_SELECTION_BOX_H
00023 #define TEAMS_SELECTION_BOX_H
00024 
00025 #include <vector>
00026 
00027 #include "../gui/box.h"
00028 #include "../gui/label.h"
00029 #include "../gui/picture_widget.h"
00030 #include "../gui/spin_button.h"
00031 #include "../gui/spin_button_big.h"
00032 #include "../gui/text_box.h"
00033 #include "team_box.h"
00034 
00035 const uint MAX_NB_TEAMS=4;
00036 
00037 // -----------------------------------------------
00038 // -----------------------------------------------
00039 
00040 class TeamsSelectionBox : public HBox
00041 { 
00042  private:  
00043   SpinButtonBig *teams_nb;
00044   std::vector<TeamBox*> teams_selections;
00045 
00046   void SetNbTeams(uint nb_teams);
00047   void PrevTeam(int i);
00048   void NextTeam(int i);
00049  public:
00050   TeamsSelectionBox(const Rectanglei &rect);
00051 
00052   void ValidTeamsSelection();
00053   Widget* Clic(const Point2i &mousePosition, uint button);
00054 };
00055 
00056 #endif

Generated on Mon Jan 1 13:10:58 2007 for Wormux by  doxygen 1.4.7