MenuLayout namespace
#include <Jazz2/UI/Menu/IMenuContainer.h>
Metrics of the menu layout that follow the size of the view.
The menu has a compact layout for the handhelds' 272-row views and a full one for 405 rows and more. Rather than switching between the two at a threshold (which left every size in between - a PS Vita at 60% rendering resolution is 326 rows - with the full layout's margins squeezed into far less room), the header, footer, title and logo metrics are blended between the two by how far the view is from one to the other. Sections whose structure differs between the layouts still switch at 300 rows.
Functions
- auto GetTransition(Vector2i viewSize) -> float
- Returns how far the view is from the compact layout towards the full one (0 to 1).
- auto Blend(float compact, float full, Vector2i viewSize) -> float
- Blends a metric between its compact and full layout values for the given view.
- auto GetTitleOffset(Vector2i viewSize) -> float
- Returns the distance of a section title (and the logo baseline) above the content bounds.
Variables
-
std::
int32_t CompactHeight constexpr - Height at and below which the compact layout applies entirely.
-
std::
int32_t FullHeight constexpr - Height at and above which the full layout applies entirely.