Log inGet started
Package

layout.module

README.md

layout

Screen shapes and the in-run score layout. Layout.shape(w, h) names a screen of w x h logical points (phone, phoneShort, phoneWide, tablet, tabletTall, desktop, ultrawide, plus compact = w < 700 or h < 560 and tall = h > 1.1 w). Layout.viewport() reads this machine's safe area and the rects the engine's touch controls and touch Menu button cover (ui.safeArea().controls). Layout.avoid(rect, controls, w, h) moves a rect the shortest way off them. Layout.run(vp, { anchor, scale }) places the score panel (a top strip on an upright phone, a corner elsewhere), its score, multiplier and combo meter boxes and a popups zone; Layout.renderRun(look, displayData, layout, t) draws it in any of the five looks. The HUD uses it when layout = "run"; Score.runLayout() hands the rects to your own HUD.

local Layout = require("scoreKit.layout")
local lay = Layout.run(Layout.viewport(), { anchor = "auto" })
print(lay.shape, lay.panel.x, lay.panel.y, lay.popups.dir)

Layout.SCREENS lists the nine screens every scoreKit part is checked on.