EpisodeSelectSection class
Episode selection menu section.
Lists the installed episodes and lets the player pick one to start or continue.
Base classes
-
template<class TItem>class ScrollableMenuSection<EpisodeData>
- Simplifies creation of unified scrollable menu sections.
Constructors, destructors, conversion operators
- EpisodeSelectSection(bool multiplayer = false, bool privateServer = false)
- Creates a new instance.
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 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 TouchEvent& event, Vector2i viewSize) override
- Called when a touch event is triggered.
Protected functions
-
void OnTouchUp(std::
int32_t newIndex, Vector2i viewSize, Vector2i touchPos) override - Called when a touch event is released.
- void OnExecuteSelected() override
- Called when the selected item should be executed.
-
void OnDrawEmptyText(Canvas* canvas,
std::
int32_t& charOffset) override - Called when an information about empty list should be drawn.
-
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.
Function documentation
Jazz2:: UI:: Menu:: EpisodeSelectSection:: EpisodeSelectSection(bool multiplayer = false,
bool privateServer = false)
Creates a new instance.
| Parameters | |
|---|---|
| multiplayer | Whether the selected level should be hosted as a multiplayer server |
| privateServer | Whether the hosted server should be private (not publicly listed) |