Skip to main content

1.2.11 — Live responsive layout

What changed

HStack/VStack layout now switches dynamically

Previously the two-column vs single-column layout was decided once at script load and never updated. If the game window started wide (≥ 960 px) the HStack stayed horizontal even if the window was later resized to a narrow size.

The layout now updates live whenever the game viewport changes:

  • ≥ 960 px → two-column HStack (groupboxes side by side)
  • < 960 px → single-column layout (groupboxes stacked vertically)

How it works: All desktop tabs always create an HStack with two inner VStack columns. When the viewport crosses the 960 px threshold the adapter changes the HStack's UIListLayout.FillDirection between Horizontal and Vertical. No sections or widgets are recreated — only the outer container's direction flips. The initial layout is also applied correctly on load (was previously always wide even on narrow screens).

Mobile (TouchEnabled without keyboard) continues to use a permanent single VStack and is unaffected by the listener.

_UIAdapter:RefreshLayout()

A new public method that re-evaluates the current viewport width and applies the correct layout direction to all existing tabs. Called automatically after the Settings tab is injected and on every subsequent viewport change — no manual use required.

Impact on existing projects

No action required. Rebuild with py rb/rb.py build.