SuperTuxKart
high_score_info_dialog.hpp
1 //
2 // SuperTuxKart - a fun racing game with go-kart
3 // Copyright (C) 2016 SuperTuxKart-Team
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 3
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 #ifndef HEADER_HIGH_SCORE_INFO_DIALOG_HPP
20 #define HEADER_HIGH_SCORE_INFO_DIALOG_HPP
21 
22 #include "guiengine/modaldialog.hpp"
23 #include "race/grand_prix_data.hpp"
24 #include "race/highscores.hpp"
25 
26 namespace GUIEngine
27 {
28  class IconButtonWidget; class LabelWidget; class ListWidget;
29  class RibbonWidget;
30 }
31 
36 {
37 
38 private:
39  Highscores* m_hs;
40 
41  GUIEngine::RibbonWidget* m_action_widget;
42  GUIEngine::IconButtonWidget* m_start_widget;
43 
44  GUIEngine::LabelWidget* m_high_score_label;
45  GUIEngine::LabelWidget* m_track_name_label;
46  GUIEngine::LabelWidget* m_num_karts_label;
47  GUIEngine::LabelWidget* m_difficulty_label;
48  GUIEngine::LabelWidget* m_reverse_label;
49  GUIEngine::LabelWidget* m_num_laps_label;
50 
51  GUIEngine::ListWidget* m_high_score_list;
52  GUIEngine::IconButtonWidget* m_track_screenshot_widget;
53 
54  void updateHighscoreEntries();
55 
56  RaceManager::MajorRaceModeType m_major_mode;
57  RaceManager::MinorRaceModeType m_minor_mode;
58 
59  float m_curr_time;
60 
61  GrandPrixData m_gp;
62 
63 public:
64  HighScoreInfoDialog(Highscores* highscore, bool is_linear, RaceManager::MajorRaceModeType major_mode);
66 
67  GUIEngine::EventPropagation processEvent(const std::string& eventSource);
68 
69  virtual void onUpdate(float dt);
70 }; // class HighScoreInfoDialog
71 
72 #endif
A button widget with an icon and optionnaly a label beneath.
Definition: icon_button_widget.hpp:44
A simple label widget.
Definition: label_widget.hpp:41
A vertical list widget with text entries.
Definition: list_widget.hpp:50
Abstract base class representing a modal dialog.
Definition: modaldialog.hpp:56
A static text/icons/tabs bar widget.
Definition: ribbon_widget.hpp:66
Simple class that hold the data relevant to a 'grand_prix', aka.
Definition: grand_prix_data.hpp:37
Dialog that allows a user to manage a high score.
Definition: high_score_info_dialog.hpp:36
virtual void onUpdate(float dt)
Called every update.
Definition: high_score_info_dialog.cpp:330
GUIEngine::EventPropagation processEvent(const std::string &eventSource)
Returns whether to block event propagation (usually, you will want to block events you processed)
Definition: high_score_info_dialog.cpp:246
Represents one highscore entry, i.e.
Definition: highscores.hpp:41
MinorRaceModeType
Minor variants to the major types of race.
Definition: race_manager.hpp:111
MajorRaceModeType
The major types or races supported in STK.
Definition: race_manager.hpp:94
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33