src/menu/results_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  * Resulst menu
00020  *****************************************************************************/
00021 
00022 #ifndef RESULTS_MENU_H
00023 #define RESULTS_MENU_H
00024 
00025 #include "menu.h"
00026 #include "../include/base.h"
00027 #include "../graphic/font.h"
00028 
00029 class TeamResults;
00030 class ResultBox;
00031 
00032 class ResultsMenu : public Menu
00033 {
00034  private:
00035     const std::vector<TeamResults*>* results;
00036     int     index;
00037 
00038     // Box sizes
00039     int     total_width;
00040     int     max_height;
00041     Point2i team_size;
00042     Point2i type_size;
00043     Point2i name_size;
00044     Point2i score_size;
00045     
00046     /* Team controllers */
00047     Button  *bt_prev_team;
00048     Button  *bt_next_team;
00049     PictureWidget *team_logo;
00050     Label   *team_name;
00051     HBox    *team_box;
00052     
00053     ResultBox* most_violent;
00054     ResultBox* most_usefull;
00055     ResultBox* most_useless;
00056     ResultBox* biggest_traitor;
00057     
00058     void __sig_ok() { };
00059     void __sig_cancel() { };
00060     
00061     void SetResult(int i);
00062     void OnClic(const Point2i &mousePosition, int button);
00063     void Draw(const Point2i &mousePosition);
00064  public:
00065     ResultsMenu(const std::vector<TeamResults*>* v,
00066                 const char *winner_name);
00067     ~ResultsMenu();
00068 };
00069 
00070 #endif //RESULTS_MENU_H

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