Jazz2::UI::Menu::EpisodeSelectSection class

Episode selection menu section.

Lists the installed episodes and lets the player pick one to start or continue. Built on top of WidgetSection with each episode drawn through a CanvasWidget; the background cross-fade, expand state and start transition are driven by the section.

Base classes

class WidgetSection
Base class of a declarative menu section.

Constructors, destructors, conversion operators

EpisodeSelectSection(EpisodeSelectMode mode = EpisodeSelectMode::Singleplayer, bool privateServer = false)
Creates a new instance.

Public functions

void OnShow(IMenuContainer* root) override
Called when the section is shown.
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 OnDrawClipped(Canvas* canvas) override
Called when the section should be drawn — the middle clipped 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::EpisodeSelectSection::EpisodeSelectSection(EpisodeSelectMode mode = EpisodeSelectMode::Singleplayer, bool privateServer = false)

Creates a new instance.

Parameters
mode How the selected episode should be started (single-player, local splitscreen or online server); anything other than single-player enables multiplayer-style level browsing (custom levels)
privateServer Whether the hosted online server should be private (not publicly listed); only used when mode is EpisodeSelectMode::OnlineMultiplayer