Jazz2::UI::Menu::SimpleMessageSection class

Section showing a simple message.

Displays a single centered message and waits for the player to confirm or go back, dismissing the screen.

Base classes

class MenuSection
Base class of a menu section.

Constructors, destructors, conversion operators

SimpleMessageSection(StringView message, bool withTransition = false)
Creates a new instance.
SimpleMessageSection(String&& message, bool withTransition = false)

Public functions

void OnUpdate(float timeMult) override
Called when the section should be updated.
void OnDraw(Canvas* canvas) override
Called when the section should be drawn — the bottom background layer.
void OnDrawOverlay(Canvas* canvas) override
Called when the section should be drawn — the top overlay layer.
void OnTouchEvent(const nCine::TouchEvent& event, Vector2i viewSize) override
Called when a touch event is triggered.

Function documentation

Jazz2::UI::Menu::SimpleMessageSection::SimpleMessageSection(StringView message, bool withTransition = false)

Creates a new instance.

Parameters
message Message to be shown
withTransition Whether a fade-in transition should be played

Jazz2::UI::Menu::SimpleMessageSection::SimpleMessageSection(String&& message, bool withTransition = false)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.