src/menu/network_menu.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  * Game menu
00020  *****************************************************************************/
00021 
00022 #ifndef NETWORK_MENU_H
00023 #define NETWORK_MENU_H
00024 
00025 #include <list>
00026 #include "menu.h"
00027 #include "network_teams_selection_box.h"
00028 #include "map_selection_box.h"
00029 #include "../include/base.h"
00030 #include "../graphic/font.h"
00031 #include "../gui/button_text.h"
00032 #include "../gui/msg_box.h"
00033 #include "../gui/text_box.h"
00034 
00035 class Team;
00036 
00037 class NetworkMenu : public Menu
00038 {
00039   /* Options controllers */
00040   SpinButton* player_number;
00041   Box* options_box;
00042   Label* connected_players;
00043   Label* inited_players;
00044   
00045   /* Chat controllers */
00046   MsgBox* msg_box;
00047   TextBox* line_to_send_tbox;
00048   Button* send_txt_bt;
00049   
00050   /* Team controllers */
00051   NetworkTeamsSelectionBox *team_box;
00052   
00053   /* Map controllers */
00054   MapSelectionBox *map_box;
00055   
00056   void SaveOptions();
00057   void OnClic(const Point2i &mousePosition, int button);
00058   void Draw(const Point2i &mousePosition);
00059   
00060   void sig_ok();
00061   void __sig_ok();
00062   void __sig_cancel();
00063   
00064 public:
00065   NetworkMenu(); 
00066   ~NetworkMenu();
00067   
00068   void AddTeamCallback(std::string team_id);
00069   void UpdateTeamCallback(std::string team_id);
00070   void DelTeamCallback(std::string team_id);
00071   void ChangeMapCallback();
00072   
00073   void ReceiveMsgCallback(std::string msg);
00074 };
00075 
00076 #endif

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