Jazz2::UI::Menu::SafeAreaOptionsSection class

Safe area options menu section.

Interactive editor for PreferencesCache::SafeArea, the margin the interface keeps from each edge of a display that does not show the whole picture. Alongside the four rows that set the edges it draws what they mean on the very screen they are being set for: the part of the picture that is being given up, and the rectangle that is left of it. Each edge can also be dragged directly with a finger.

While the menu is being driven by touch the on-screen controls are drawn too, together with a second rectangle for what the HUD is left with once they have had their share. They are not moved by the safe area - the player places them wherever they can be reached (see TouchControlsOptionsSection) - but the HUD keeps clear of them, so that inner rectangle is the margin measured from the buttons rather than from the edge of the screen.

Base classes

class WidgetSection
Base class of a declarative menu section.

Constructors, destructors, conversion operators

~SafeAreaOptionsSection() override

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 OnTouchEvent(const nCine::TouchEvent& event, Vector2i viewSize) override
Called when a touch event is triggered.