19 #ifndef HEADER_RACE_GUI_BASE_HPP
20 #define HEADER_RACE_GUI_BASE_HPP
24 #include <irrString.h>
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)
106 m_remaining_time = ( time < 0.0f ) ? -1.0f : time;
108 m_important = important;
109 m_big_font = big_font;
114 bool done(
const float dt)
116 m_remaining_time -= dt;
117 return m_remaining_time < 0;
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;
206 void createRegularPolygon(
unsigned int n,
float radius,
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);
216 void drawGlobalMusicDescription();
217 void drawGlobalReadySetGo();
218 void drawGlobalGoal();
219 void drawPlungerInFace(
const Camera *camera,
float dt);
242 virtual void renderGlobal(
float dt);
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);
253 virtual void preRenderCallback(
const Camera *camera);
256 virtual const core::dimension2du
258 virtual void calculateMinimapSize() {};
260 virtual void clearAllMessages() { m_messages.clear(); }
262 void drawGlobalPlayerIcons(
int bottom_margin);
263 void drawPlayerIcon(
AbstractKart *kart,
int x,
int y,
int w,
266 virtual void drawEnergyMeter(
int x,
int y,
const AbstractKart *kart,
267 const core::recti &viewport,
268 const core::vector2df &scaling) {};
270 void cleanupMessages(
const float dt);
271 void removeReferee();
275 virtual void initSize();
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
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
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
video::ITexture * m_icons_kart_list
The frame around player karts in the kart list.
Definition: race_gui_base.hpp:198
Referee * m_referee
The referee scene node.
Definition: race_gui_base.hpp:151
virtual const core::dimension2du getMiniMapSize() const =0
Returns the size of the texture on which to render the minimap to.
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
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