20#ifndef HEADER_GP_INFO_SCREEN_HPP
21#define HEADER_GP_INFO_SCREEN_HPP
23#include "guiengine/screen.hpp"
24#include "race/grand_prix_data.hpp"
25#include "guiengine/CGUISpriteBank.hpp"
33 class IconButtonWidget;
73 irr::gui::STKModifiedSpriteBank* m_icon_bank;
95 void updateRandomGP();
104 void onEnterPressedInternal();
106 const int player_id) OVERRIDE;
108 virtual
void init() OVERRIDE;
111 virtual
void onUpdate(
float dt) OVERRIDE;
113 void setGP(const std::
string &gp_ident);
Dialog that shows information about a specific grand prix.
Definition: gp_info_screen.hpp:44
GPInfoScreen()
Constructor, initialised some variables which might be used before loadedFromFile is called.
Definition: gp_info_screen.cpp:59
int getMaxNumTracks(std::string group)
Get number of available tracks for random GPs.
Definition: gp_info_screen.cpp:468
virtual void onUpdate(float dt) OVERRIDE
Called every update.
Definition: gp_info_screen.cpp:444
virtual void init() OVERRIDE
Called before the screen is shown.
Definition: gp_info_screen.cpp:182
virtual void eventCallback(GUIEngine::Widget *, const std::string &name, const int player_id) OVERRIDE
Handle user input.
Definition: gp_info_screen.cpp:350
virtual ~GPInfoScreen()
Places the focus back on the selected GP, in the case that the dialog was cancelled and we're returni...
Definition: gp_info_screen.hpp:102
GrandPrixData m_gp
The grand prix data.
Definition: gp_info_screen.hpp:87
GUIEngine::SpinnerWidget * m_reverse_spinner
Spinner for reverse mode.
Definition: gp_info_screen.hpp:50
std::string m_group_name
The currently selected group name.
Definition: gp_info_screen.hpp:65
GUIEngine::SpinnerWidget * m_time_target_spinner
Spinner for time target in Lap Trial.
Definition: gp_info_screen.hpp:59
virtual void unloaded() OVERRIDE
Callback invoked when this screen is being unloaded.
Definition: gp_info_screen.cpp:562
virtual void loadedFromFile() OVERRIDE
Called when the stkgui file is read.
Definition: gp_info_screen.cpp:71
void updateHighscores()
Load highscores for grandprix.
Definition: gp_info_screen.cpp:505
std::vector< std::string > m_group_names
The untranslated group names, used as internal IDs.
Definition: gp_info_screen.hpp:68
int m_max_num_tracks
Number of available tracks.
Definition: gp_info_screen.hpp:71
GUIEngine::SpinnerWidget * m_ai_kart_spinner
Spinner for number of AI karts.
Definition: gp_info_screen.hpp:56
GrandPrixData::GPReverseType getReverse() const
Converts the currently selected reverse status into a value of type GPReverseType .
Definition: gp_info_screen.cpp:131
virtual void beforeAddingWidget() OVERRIDE
Optional callback invoked very early, before widgets have been added (contrast with init(),...
Definition: gp_info_screen.cpp:145
void setGP(const std::string &gp_ident)
Sets the GP to be displayed.
Definition: gp_info_screen.cpp:112
int m_unknown_kart_icon
Icon for unknown kart in highscore list.
Definition: gp_info_screen.hpp:75
GUIEngine::SpinnerWidget * m_num_tracks_spinner
Spinner for number of tracks (in case of random GP).
Definition: gp_info_screen.hpp:53
GUIEngine::ListWidget * m_highscore_list
List with last 5 highscores.
Definition: gp_info_screen.hpp:62
GUIEngine::SpinnerWidget * m_group_spinner
Spinner for the different track groups.
Definition: gp_info_screen.hpp:47
void addTracks()
display all the tracks according to the current gp For a normal gp info dialog, it just creates a lab...
Definition: gp_info_screen.cpp:314
void addScreenshot()
Creates a screenshot widget in the placeholder of the GUI.
Definition: gp_info_screen.cpp:331
Declares a class to be a singleton.
Definition: screen.hpp:59
Represents a single GUI screen.
Definition: screen.hpp:97
Simple class that hold the data relevant to a 'grand_prix', aka.
Definition: grand_prix_data.hpp:36
GPReverseType
Used to define the reverse setting when creating a random GP: No reverse, all reverse (if available o...
Definition: grand_prix_data.hpp:89
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33