Jazz2::UI::Menu::MenuSection class

Base class of a menu section.

Derived classes

template<class TItem>
class ScrollableMenuSection
Simplifies creation of unified scrollable menu sections.
class AboutSection
About menu section.
class BeginSection
Main menu root section.
class CreateServerOptionsSection
class CustomLevelSelectSection
class ImportSection
Import Episodes menu section (Emscripten only)
class InputDiagnosticsSection
class LoadingSection
Loading menu section.
class PauseSection
In-game menu root section.
class RefreshCacheSection
class ServerSelectSection
class SimpleMessageSection
Section showing a simple message.
class SoundsOptionsSection
class StartGameOptionsSection
class TouchControlsOptionsSection

Constructors, destructors, conversion operators

MenuSection()
~MenuSection() virtual

Public functions

auto GetClipRectangle(const Recti& contentBounds) -> Recti virtual
Allows to override clip rectangle of the middle layer.
void OnShow(IMenuContainer* root) virtual
Called when the section is shown.
void OnHide() virtual
Called when the section is hidden.
void OnUpdate(float timeMult) pure virtual
Called when the section should be updated.
void OnDraw(Canvas* canvas) pure virtual
Called when the section should be drawn — the bottom background layer.
void OnDrawClipped(Canvas* canvas) virtual
Called when the section should be drawn — the middle clipped layer.
void OnDrawOverlay(Canvas* canvas) virtual
Called when the section should be drawn — the top overlay layer.
void OnKeyPressed(const nCine::KeyboardEvent& event) virtual
Called when a key is pressed.
void OnKeyReleased(const nCine::KeyboardEvent& event) virtual
Called when a key is released.
void OnTextInput(const nCine::TextInputEvent& event) virtual
Called when a text input is detected.
void OnTouchEvent(const nCine::TouchEvent& event, Vector2i viewSize) pure virtual
Called when a touch event is triggered.
auto GetNavigationFlags() const -> NavigationFlags virtual
Allows to override navigation behavior.

Protected static variables

static float TouchKineticDivider constexpr
Kinetic divider for smooth touch controls.
static float TouchKineticFriction constexpr
Kinetic friction for smooth touch controls.
static float TouchKineticDamping constexpr
Kinetic damping for smooth touch controls.