Jazz2::Multiplayer::IGameModeHUD class

Drawing surface a game mode uses to render its own part of the HUD.

Implemented by the HUD (the online UI::Multiplayer::MpHUD or a local splitscreen HUD). It exposes only the primitives a mode needs for its score area, so a mode owns its HUD without depending on the concrete HUD type or its sprite constants. The text and icon primitives draw a drop shadow plus the main content in one call (the shadow is offset down by shadowOffsetY).

Derived classes

class Jazz2::UI::Multiplayer::MpHUD
Player HUD for multiplayer.

Constructors, destructors, conversion operators

~IGameModeHUD() virtual

Public functions

void DrawHudText(GameModeFontType font, StringView text, float x, float y, float shadowOffsetY, UI::Alignment alignment, const Colorf& color, float scale, float charSpacing, float angleOffset = 0.0f, float variance = 0.0f, float speed = 0.0f) pure virtual
Draws a text string (shadow + main) with the small or medium HUD font.
void DrawHudIcon(GameModeHudIcon icon, float x, float y, float shadowOffsetY, UI::Alignment alignment, const Colorf& color, float scaleX, float scaleY) pure virtual
Draws a semantic HUD icon (shadow + main).
void DrawPositionInRound(const Rectf& view, Actors::Player* player) pure virtual
Draws the shared leaderboard ("position in round") for the player's split-screen view.
void DrawMinimap(const Rectf& view, Actors::Player* player) pure virtual
Draws the race-track minimap for the player's split-screen view.

Function documentation

void Jazz2::Multiplayer::IGameModeHUD::DrawHudText(GameModeFontType font, StringView text, float x, float y, float shadowOffsetY, UI::Alignment alignment, const Colorf& color, float scale, float charSpacing, float angleOffset = 0.0f, float variance = 0.0f, float speed = 0.0f) pure virtual

Draws a text string (shadow + main) with the small or medium HUD font.

angleOffset, variance and speed drive the optional wavy-text animation (all 0 = static text, which is what most HUD text uses).