src/menu/network_connection_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  * Network connection menu: this menu allows the user to choose between
00020  * hosting a game or connecting to a server.
00021  *****************************************************************************/
00022 
00023 #ifndef NETWORK_CONNECTION_MENU_H
00024 #define NETWORK_CONNECTION_MENU_H
00025 
00026 #include <list>
00027 #include "menu.h"
00028 #include "../include/base.h"
00029 #include "../graphic/font.h"
00030 #include "../gui/button_text.h"
00031 #include "../gui/msg_box.h"
00032 #include "../gui/text_box.h"
00033 
00034 class NetworkConnectionMenu : public Menu
00035 {
00036   typedef enum {
00037     NET_HOST,
00038     NET_CONNECT_LOCAL,
00039     NET_BROWSE_INTERNET
00040   } network_menu_action_t;
00041 
00042    /* Connection controllers */
00043    Button *previous_action_bt, *next_action_bt;
00044    
00045    Label* action_label;
00046    network_menu_action_t current_action;
00047    
00048    Label* server_address_label;
00049    TextBox* server_address;
00050    
00051    Label* port_number_label;
00052    TextBox* port_number;
00053 
00054    CheckBox* internet_server;
00055    VBox* connection_box;
00056 
00057    MsgBox *msg_box;
00058 
00059    void OnClic(const Point2i &mousePosition, int button);
00060    void Draw(const Point2i &mousePosition);
00061 
00062    void SetAction(network_menu_action_t action);
00063 
00064    void sig_ok();
00065    void __sig_ok();
00066    void __sig_cancel();
00067 
00068 public:
00069    NetworkConnectionMenu(); 
00070    ~NetworkConnectionMenu();
00071 };
00072 
00073 #endif

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