19#ifndef HEADER_RACE_GUI_BASE_HPP
20#define HEADER_RACE_GUI_BASE_HPP
27#include <dimension2d.h>
31 namespace video {
class ITexture;
struct S3DVertex; }
32 namespace scene {
class IAnimatedMeshSceneNode; }
36#include "utils/vec3.hpp"
70 bool m_outlined_font =
false;
101 const video::SColor &color,
const bool important,
102 bool big_font,
bool outline)
109 m_big_font = big_font;
114 bool done(
const float dt)
122 typedef std::vector<TimedMessage> AllMessageType;
123 AllMessageType m_messages;
124 int m_small_font_max_height;
137 m_string_waiting_for_others, m_string_waiting_for_the_server;
155 bool m_enabled_network_spectator;
160 bool m_showing_kart_colors;
168 PLUNGER_STATE_SLOW_2, PLUNGER_STATE_FAST}
179 core::vector2df m_plunger_speed;
192 video::ITexture *m_gauge_goal;
207 const core::vector2df ¢er,
208 const video::SColor &color,
209 video::S3DVertex *v,
unsigned short int *index);
211 const core::recti &viewport,
212 const core::vector2df &scaling);
214 const core::recti &viewport,
215 const core::vector2df &scaling);
218 void drawGlobalGoal();
244 virtual void reset();
245 virtual void renderPlayerView(
const Camera *camera,
float dt);
246 virtual void addMessage(
const irr::core::stringw &m,
248 const video::SColor &color=
249 video::SColor(255, 255, 0, 255),
251 bool big_font=
false,
bool outline=
false);
252 virtual void update(
float dt);
256 virtual const core::dimension2du
258 virtual void calculateMinimapSize() {};
260 virtual void clearAllMessages() { m_messages.clear(); }
266 virtual void drawEnergyMeter(
int x,
int y,
const AbstractKart *kart,
267 const core::recti &viewport,
268 const core::vector2df &scaling) {};
271 void removeReferee();
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
This is the base class for all cameras.
Definition: camera.hpp:49
Definition: material.hpp:48
Definition: race_gui_base.hpp:79
bool m_important
Important msgs are displayed in the middle of the screen.
Definition: race_gui_base.hpp:90
video::SColor m_color
Color of message.
Definition: race_gui_base.hpp:86
irr::core::stringw m_message
Message to display.
Definition: race_gui_base.hpp:82
float m_remaining_time
Time remaining before removing this message from screen.
Definition: race_gui_base.hpp:84
An abstract base class for the two race guis (race_gui and race_result gui)
Definition: race_gui_base.hpp:50
int m_max_font_height
Used to display messages without overlapping.
Definition: race_gui_base.hpp:127
video::ITexture * m_plunger_face
Texture for the 'plunger in the face' texture.
Definition: race_gui_base.hpp:133
std::vector< KartIconDisplayInfo > m_kart_display_infos
This vector is passed to world to be filled with the current race data information.
Definition: race_gui_base.hpp:234
video::ITexture * m_music_icon
Musical notes icon (for music description and credits)
Definition: race_gui_base.hpp:130
void ignoreUnimportantMessages()
Instructs the base gui to ignore unimportant messages (like item messages).
Definition: race_gui_base.hpp:223
std::vector< Vec3 > m_referee_rotation
The actual rotation to use for the referee for each kart.
Definition: race_gui_base.hpp:143
float m_referee_height
The height of the referee.
Definition: race_gui_base.hpp:148
video::ITexture * m_gauge_full
Default texture for nitro gauge.
Definition: race_gui_base.hpp:188
float m_icons_inertia
can be zero
Definition: race_gui_base.hpp:227
core::stringw m_string_ready
Translated strings 'ready', 'set', 'go'.
Definition: race_gui_base.hpp:136
PlungerState
State of the plunger: From the 'init' states the plunger switches between two slow moving states ('sh...
Definition: race_gui_base.hpp:167
void createRegularPolygon(unsigned int n, float radius, const core::vector2df ¢er, const video::SColor &color, video::S3DVertex *v, unsigned short int *index)
Creates the 2D vertices for a regular polygon.
Definition: race_gui_base.cpp:234
virtual void update(float dt)
Update, called once per frame.
Definition: race_gui_base.cpp:471
virtual void reset()
This is called when restarting a race.
Definition: race_gui_base.cpp:166
float m_plunger_move_time
How long the plunger should stay in the current state.
Definition: race_gui_base.hpp:172
bool m_ignore_unimportant_messages
True if unimportant messags (like item messages) should not be displayed.
Definition: race_gui_base.hpp:76
std::vector< Vec3 > m_referee_pos
The position of the referee for all karts.
Definition: race_gui_base.hpp:140
void drawGlobalReadySetGo()
Draws the ready-set-go message on the screen.
Definition: race_gui_base.cpp:734
void drawPlungerInFace(const Camera *camera, float dt)
Draws the plunger-in-face if necessary.
Definition: race_gui_base.cpp:1277
video::ITexture * m_gauge_empty
The size of a single marker in pixels, must be a power of 2.
Definition: race_gui_base.hpp:186
virtual void renderGlobal(float dt)
Updates lightning related information.
Definition: race_gui_base.cpp:461
video::ITexture * m_icons_kart_list
The frame around player karts in the kart list.
Definition: race_gui_base.hpp:198
void cleanupMessages(const float dt)
Removes messages which have been displayed long enough.
Definition: race_gui_base.cpp:358
void drawAllMessages(const AbstractKart *kart, const core::recti &viewport, const core::vector2df &scaling)
Displays all messages in the message queue.
Definition: race_gui_base.cpp:256
void drawPlayerIcon(AbstractKart *kart, int x, int y, int w, bool is_local)
Draw one player icon Takes care of icon looking different due to plumber, squashing,...
Definition: race_gui_base.cpp:1033
void drawGlobalPlayerIcons(int bottom_margin)
Draw players icons and, depending on the current mode, their time or their score (battle lives,...
Definition: race_gui_base.cpp:785
virtual void addMessage(const irr::core::stringw &m, const AbstractKart *kart, float time, const video::SColor &color=video::SColor(255, 255, 0, 255), bool important=true, bool big_font=false, bool outline=false)
Adds a message to the message queue.
Definition: race_gui_base.cpp:597
virtual void initSize()
Called when loading the race gui or screen resized.
Definition: race_gui_base.cpp:135
virtual ~RaceGUIBase()
The destructor removes the marker texture and the referee scene node.
Definition: race_gui_base.cpp:204
Referee * m_referee
The referee scene node.
Definition: race_gui_base.hpp:151
void drawGlobalMusicDescription()
Displays the description given for the music currently being played.
Definition: race_gui_base.cpp:609
virtual const core::dimension2du getMiniMapSize() const =0
Returns the size of the texture on which to render the minimap to.
virtual void init()
This is a second initialisation call (after the constructor) for the race gui.
Definition: race_gui_base.cpp:151
float m_dist_show_overlap
Distance on track to begin showing overlap in drawGlobalPlayerIcons.
Definition: race_gui_base.hpp:226
video::ITexture * m_gauge_full_bright
Highlight gauge, used when a kart uses nitro.
Definition: race_gui_base.hpp:190
video::ITexture * m_icons_frame
The frame around player karts in the mini map.
Definition: race_gui_base.hpp:195
std::vector< core::vector2d< s32 > > m_previous_icons_position
can be zero
Definition: race_gui_base.hpp:230
video::ITexture * m_lap_flag
Texture for the lap icon.
Definition: race_gui_base.hpp:201
core::vector2di m_plunger_offset
Offset of the plunger.
Definition: race_gui_base.hpp:175
void drawPowerupIcons(const AbstractKart *kart, const core::recti &viewport, const core::vector2df &scaling)
Draws the powerup icons on the screen (called once for each player).
Definition: race_gui_base.cpp:380
virtual void preRenderCallback(const Camera *camera)
This function is called just before rendering the view for each kart.
Definition: race_gui_base.cpp:565
Definition: race_gui_multitouch.hpp:39
This implements the referee, a character that is displayed at the start of the race holding a 'ready-...
Definition: referee.hpp:53
Used to display the list of karts and their times or whatever other info is relevant to the current m...
Definition: race_gui_base.hpp:57
core::stringw special_title
If this kart has a special title, e.g.
Definition: race_gui_base.hpp:65
video::SColor m_color
Text color, if any text.
Definition: race_gui_base.hpp:62
core::stringw m_text
Text to display next to icon, if any.
Definition: race_gui_base.hpp:59
int lap
Current lap of this kart, or -1 if irrelevant.
Definition: race_gui_base.hpp:68