src/menu/team_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  *  Team box
00020  *****************************************************************************/
00021 
00022 #ifndef TEAM_BOX_H
00023 #define TEAM_BOX_H
00024 
00025 #include "../gui/box.h"
00026 #include "../gui/label.h"
00027 #include "../gui/picture_widget.h"
00028 #include "../gui/spin_button.h"
00029 #include "../gui/text_box.h"
00030 
00031 class Team;
00032 
00033 class TeamBox : public HBox
00034 {
00035  private:
00036   bool is_local; // local/remote team
00037 
00038   Team * associated_team;
00039   PictureWidget *team_logo;
00040   Label * team_name;
00041   TextBox * player_name;
00042   SpinButton * nb_characters;
00043 
00044  public:
00045   TeamBox(std::string player_name, const Rectanglei &rect);
00046 
00047   void SetTeam(Team& _team, bool read_team_values=false);
00048   void ClearTeam();
00049   Team* GetTeam() const;  
00050   void ValidOptions() const;
00051 
00052   bool IsLocal() const;
00053 
00054   void Update(const Point2i &mousePosition,
00055               const Point2i &lastMousePosition,
00056               Surface& surf);
00057   Widget* Clic(const Point2i &mousePosition, uint button);
00058 };
00059 
00060 #endif

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