20 #ifndef HEADER_RACE_GUI_HPP 21 #define HEADER_RACE_GUI_HPP 26 #include <irrString.h> 29 #include "states_screens/race_gui_base.hpp" 86 int m_negative_timer_additional_width;
94 irr::video::ITexture *m_blue_team;
95 irr::video::ITexture *m_red_flag;
96 irr::video::ITexture *m_blue_flag;
97 irr::video::ITexture *m_soccer_ball;
98 irr::video::ITexture *m_heart_icon;
99 irr::video::ITexture *m_basket_ball_icon;
105 irr::video::ITexture *m_speed_bar_icon;
110 std::vector<AnimationState> m_animation_states;
121 void drawEnergyMeter (
int x,
int y,
const AbstractKart *kart,
122 const core::recti &viewport,
123 const core::vector2df &scaling);
125 const core::recti &viewport,
126 const core::vector2df &scaling,
float dt);
128 const core::recti &viewport,
129 const core::vector2df &scaling);
131 const core::vector2df &offset,
132 float min_ratio,
int meter_width,
133 int meter_height,
float dt);
137 void drawMeterTexture(video::ITexture *meter_texture, video::S3DVertex vertices[],
unsigned int count,
bool reverse =
false);
139 unsigned int computeVerticesForMeter(core::vector2df position[],
float threshold[], video::S3DVertex vertices[],
140 unsigned int vertices_count,
float measure,
int gauge_width,
141 int gauge_height, core::vector2df offset);
144 void drawGlobalMiniMap ();
145 void drawGlobalTimer ();
146 void drawLiveDifference ();
153 virtual void reset();
154 virtual void renderGlobal(
float dt);
155 virtual void renderPlayerView(
const Camera *camera,
float dt);
159 {
return core::dimension2du(m_map_width, m_map_height); }
160 virtual void initSize();
161 virtual void calculateMinimapSize();
irr::video::ITexture * m_red_team
Icon textures (stored as variables to not look up their location on every frame)
Definition: race_gui.hpp:93
An abstract base class for the two race guis (race_gui and race_result gui)
Definition: race_gui_base.hpp:49
int m_small_precise_timer_width
Maximum string length for a small precise timer (like the live difference timer under a minute) ...
Definition: race_gui.hpp:80
int m_map_rendered_height
The height of the rendered mini map in pixels, must be a power of 2.
Definition: race_gui.hpp:58
int m_map_bottom
Distance of map from bottom of screen.
Definition: race_gui.hpp:70
int m_minimap_player_size
The size of a single marker on the screen or player karts, need not be a power of 2...
Definition: race_gui.hpp:52
Definition: three_d_animation.hpp:32
virtual const core::dimension2du getMiniMapSize() const
Returns the size of the texture on which to render the minimap to.
Definition: race_gui.hpp:158
int m_minimap_ai_size
The size of a single marker on the screen for AI karts, need not be a power of 2. ...
Definition: race_gui.hpp:48
irr::video::ITexture * m_champion
Texture for the hit limit icon.
Definition: race_gui.hpp:101
int m_font_height
Height of the digit font.
Definition: race_gui.hpp:89
irr::video::ITexture * m_speed_meter_icon
Texture for speedometer.
Definition: race_gui.hpp:104
int m_map_rendered_width
The width of the rendered mini map in pixels, must be a power of 2.
Definition: race_gui.hpp:55
AnimationState
Animation state: none, getting smaller (old value), getting bigger (new number).
Definition: race_gui.hpp:109
int m_timer_width
Maximum string length for the timer.
Definition: race_gui.hpp:76
int m_map_left
Distance of map from left side of screen.
Definition: race_gui.hpp:67
Definition: material.hpp:47
Handles the in-race GUI (messages, mini-map, rankings, timer, etc...)
Definition: race_gui.hpp:40
int m_lap_width
Maximum lap display length (either 9/9 or 99/99).
Definition: race_gui.hpp:73
std::vector< int > m_last_ranks
Stores the previous rank for each kart.
Definition: race_gui.hpp:116
int m_map_width
Width of the map in pixels on the screen, need not be a power of 2.
Definition: race_gui.hpp:61
std::vector< float > m_rank_animation_duration
How long the rank animation has been shown.
Definition: race_gui.hpp:113
This is the base class for all cameras.
Definition: camera.hpp:48
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:61
int m_map_height
Height of the map in pixels on the screen, need not be a power of 2.
Definition: race_gui.hpp:64
int m_big_precise_timer_width
Maximum string length for a big precise timer (like the live difference timer over a minute) ...
Definition: race_gui.hpp:84