Jazz2::UI::Menu::HighscoresSection class

Highscores menu section.

Base classes

template<class TItem>
class ScrollableMenuSection<HighscoreItem*>
Simplifies creation of unified scrollable menu sections.

Public static functions

static auto TryGetSeriesIndex(StringView episodeName, bool playerDied) -> std::int32_t

Constructors, destructors, conversion operators

HighscoresSection()
HighscoresSection(std::int32_t seriesIndex, GameDifficulty difficulty, bool isReforged, bool cheatsUsed, std::uint64_t elapsedMilliseconds, const PlayerCarryOver& itemToAdd)

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 OnKeyPressed(const nCine::KeyboardEvent& event) override
Called when a key is pressed.
void OnTextInput(const nCine::TextInputEvent& event) override
Called when a text input is detected.
auto GetNavigationFlags() const -> NavigationFlags override
Allows to override navigation behavior.

Private functions

void OnLayoutItem(Canvas* canvas, ListViewItem& item) override
Called when an item layout should be calculated.
void OnDrawItem(Canvas* canvas, ListViewItem& item, std::int32_t& charOffset, bool isSelected) override
Called when an item should be drawn.
void OnHandleInput() override
Called when input should be handled.
void OnTouchEvent(const nCine::TouchEvent& event, Vector2i viewSize) override
Called when a touch event is triggered.
void OnExecuteSelected() override
Called when the selected item should be executed.
void OnBackPressed() override
Called when back button is pressed.