SuperTuxKart
Loading...
Searching...
No Matches
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 "guiengine/widgets.hpp"
24#include "race/grand_prix_data.hpp"
25#include "race/highscores.hpp"
26
31{
32
33private:
34 Highscores* m_hs;
35
36 GUIEngine::RibbonWidget* m_action_widget;
37 GUIEngine::IconButtonWidget* m_start_widget;
38
39 GUIEngine::LabelWidget* m_high_score_label;
40 GUIEngine::LabelWidget* m_track_name_label;
41 GUIEngine::LabelWidget* m_num_karts_label;
42 GUIEngine::LabelWidget* m_difficulty_label;
43 GUIEngine::LabelWidget* m_reverse_label;
44 GUIEngine::LabelWidget* m_num_laps_label;
45
46 GUIEngine::ListWidget* m_high_score_list;
47 GUIEngine::IconButtonWidget* m_track_screenshot_widget;
48
49 void updateHighscoreEntries();
50
53
54 float m_curr_time;
55
56 GrandPrixData m_gp;
57
58public:
59 HighScoreInfoDialog(Highscores* highscore, bool is_linear, RaceManager::MajorRaceModeType major_mode);
61
62 GUIEngine::EventPropagation processEvent(const std::string& eventSource);
63
64 virtual void onUpdate(float dt);
65}; // class HighScoreInfoDialog
66
67#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:36
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:60
Simple class that hold the data relevant to a 'grand_prix', aka.
Definition: grand_prix_data.hpp:36
Dialog that allows a user to manage a high score.
Definition: high_score_info_dialog.hpp:31
virtual void onUpdate(float dt)
Called every update.
Definition: high_score_info_dialog.cpp:326
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:242
Represents one highscore entry, i.e.
Definition: highscores.hpp:41
MinorRaceModeType
Minor variants to the major types of race.
Definition: race_manager.hpp:110
MajorRaceModeType
The major types or races supported in STK.
Definition: race_manager.hpp:93