mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-15 15:51:17 +02:00
feat: UI LAYOUT option, centered by default
Edge docking and zoom-linked UI scaling shipped as unconditional behaviour. Both are departures from how the port composed the screen, so they become a setting instead: UI LAYOUT = CENTERED (the default) or DYNAMIC. CENTERED is a fixed letterbox. Elements stay where they were drawn in the 160x144 canvas, and the UI does not follow the survey zoom, so screen furniture neither moves nor resizes under the player. That is what the pre-anchoring builds did. DYNAMIC is the current behaviour, unchanged. Both halves matter together: gating only the anchoring would stop the dialogue box moving but leave it resizing with the zoom, which is the same complaint in a different form. Gated at Renderer:setUIAnchor and Renderer:uiScale rather than at each caller, so one switch covers the dialogue box, its YES/NO, the START menu and anything anchored later, and no caller knows the option exists. Game.dynamicUI answers true only for an explicit "dynamic", so a save written before this keeps the layout it already had. Independent of it, deliberately: BATTLE SIZE still works under either mode (uiFill overrides the scale later, in endFrame), and a battle still holds its own prompts inside its screen under DYNAMIC. Also includes the Oak intro fix (previously #674): the speech fills white over the UI canvas while its dialogue box docks to the window edge, so under DYNAMIC black showed between the two. letterboxWhite closes it, and the shrink beat's replica box rides the same anchor as the real box it stands in for.
This commit is contained in:
@@ -191,6 +191,23 @@ local function buildRows(game)
|
||||
o.battleBg = order[(cur - 1 + (dir or 1)) % #order + 1]
|
||||
return true
|
||||
end },
|
||||
-- CENTERED is a fixed letterbox: elements stay inside the 160x144 canvas
|
||||
-- and the UI does not follow the survey zoom, so nothing moves or resizes
|
||||
-- under the player. The composition the port shipped with. DYNAMIC docks
|
||||
-- the dialogue box to the window's bottom edge and the START menu to its
|
||||
-- top right, and steps the UI down with the zoom -- easier to read zoomed
|
||||
-- out, but it moves furniture the original never moved, so it is opt-in.
|
||||
-- BATTLE SIZE is independent of this and works under either.
|
||||
{ id = "uiLayout", label = Strings("UI LAYOUT"),
|
||||
value = function(g)
|
||||
return g.save.options.uiLayout == "dynamic" and Strings("DYNAMIC")
|
||||
or Strings("CENTERED")
|
||||
end,
|
||||
step = function(g)
|
||||
local o = g.save.options
|
||||
o.uiLayout = o.uiLayout == "dynamic" and "centered" or "dynamic"
|
||||
return true
|
||||
end },
|
||||
{ id = "ruleset", label = Strings("RULESET"),
|
||||
value = function(g) return rulesetName(g) end,
|
||||
step = function(g, dir)
|
||||
|
||||
Reference in New Issue
Block a user