mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-14 01:11:07 +02:00
3069b2e2a9
* new launcher and save converts and pipeline * fixing bugs
34 lines
1.1 KiB
Lua
34 lines
1.1 KiB
Lua
-- The cursor/border/geometry constants every menu used to redeclare
|
|
-- locally, centralized so field.theme can restyle all of them at once.
|
|
-- Defaults are the current literals; the merge never runs without a mod,
|
|
-- so a vanilla boot draws byte-identically.
|
|
|
|
local Font = require("src.render.Font")
|
|
local Merge = require("src.mods.Merge")
|
|
local Renderer = require("src.render.Renderer")
|
|
|
|
local Theme = {
|
|
cursor = 0xED, -- the filled arrow (charmap.asm $ED)
|
|
cursorHollow = 0xEC, -- the unfilled arrow left on chosen rows
|
|
moreArrow = 0xEE, -- more-below marker (charmap.asm $EE)
|
|
tile = 8,
|
|
cols = Renderer.WIDTH / 8,
|
|
rows = Renderer.HEIGHT / 8,
|
|
textBox = { tx = 0, ty = 12, tw = 20, th = 6, maxCols = 18 },
|
|
-- InitYesNoTextBoxParameters / AskName: hlcoord 14, 7 (YES_NO_MENU 4x3)
|
|
choiceBox = { tx = 14, ty = 7, tw = 6, th = 5 },
|
|
}
|
|
|
|
function Theme.load(data)
|
|
-- Font.load rebuilds its border table, so pick it up here rather than at
|
|
-- require time
|
|
Theme.border = Font.BORDER
|
|
local t = data and data.field and data.field.theme
|
|
if t then
|
|
Merge.deepMerge(Theme, t)
|
|
Font.BORDER = Theme.border
|
|
end
|
|
end
|
|
|
|
return Theme
|