Jazz2::UI::HUD class

Player HUD.

Base classes

class Canvas
Canvas.

Derived classes

class MpHUD
Player HUD for multiplayer.

Constructors, destructors, conversion operators

HUD(LevelHandler* levelHandler)
~HUD()

Public functions

void OnUpdate(float timeMult) override
Called every frame to update the object state.
auto OnDraw(RenderQueue& renderQueue) -> bool override
Called when the object needs to be drawn.
void OnTouchEvent(const TouchEvent& event, std::uint32_t& overrideActions)
void ShowLevelText(StringView text)
Shows a text notification.
void ShowCoins(std::int32_t count)
Shows a notification about coins.
void ShowGems(std::uint8_t gemType, std::int32_t count)
Shows a notification about gems.
void BeginFadeIn()
Begins a fullscreen fade-in transition.
void BeginFadeOut(float delay = 0.0f)
Begins a fullscreen face-out transition.
auto IsWeaponWheelVisible(std::int32_t playerIndex) const -> bool
Returns true if weapon wheel is visible.

Protected functions

void OnDrawHealth(const Rectf& view, const Rectf& adjustedView, Actors::Player* player) virtual
Called when health of the player needs to be drawn.
void OnDrawScore(const Rectf& view, Actors::Player* player) virtual
Called when score of the player needs to be drawn.
void OnDrawWeaponAmmo(const Rectf& adjustedView, Actors::Player* player) virtual
Called when weapon ammo of the player needs to be drawn.
void OnDrawActiveBoss(const Rectf& adjustedView) virtual
Called when health of the active boss needs to be drawn.
void OnDrawLevelText(std::int32_t& charOffset) virtual
Called when a text notification needs to be drawn.
void OnDrawCoins(const Rectf& view, std::int32_t& charOffset) virtual
Called when a notification about coins of the player needs to be drawn.
void OnDrawGems(const Rectf& view, std::int32_t& charOffset) virtual
Called when a notification about gems of the player needs to be drawn.
void DrawHealthCarrots(float x, float y, std::int32_t health)
Draws carrotized health bar (Reforged)
void DrawViewportSeparators()
Draws separators of split-screen viewports.
void DrawElement(AnimState state, std::int32_t frame, float x, float y, std::uint16_t z, Alignment align, const Colorf& color, float scaleX = 1.0f, float scaleY = 1.0f, bool additiveBlending = false, float angle = 0.0f)
Draws a textured element.
void DrawElementClipped(AnimState state, std::int32_t frame, float x, float y, std::uint16_t z, Alignment align, const Colorf& color, float clipX, float clipY)
Draws a textured element with clipping.

Constants

static std::uint16_t MainLayer protected constexpr
static std::uint16_t ShadowLayer protected constexpr
static std::uint16_t FontLayer protected constexpr
static std::uint16_t FontShadowLayer protected constexpr
static std::uint16_t TouchButtonsLayer protected constexpr