moved zoom into base templates, fixed performance and memory issues

This commit is contained in:
2026-06-10 22:21:56 -07:00
parent 9a908e89ae
commit e8ca768e87
11 changed files with 151 additions and 113 deletions
+6 -13
View File
@@ -23,7 +23,10 @@ local function index(window, q, callback)
label.textColor = color.white
label.color = color.new("#363ac8")
label:setFont(50)
choices = window:newFrame(noOf(0,.3,1,.7))
label:centerFont()
label:scaleFont(2/3)
local choices = window:newFrame(noOf(0,.3,1,.7))
choices.color = color.new("#363ac8")
function choices:newChoice(choice, i)
@@ -52,9 +55,8 @@ local function index(window, q, callback)
choiceText.textColor = color.white
-- choiceText.align = window.ALIGN_CENTER
choiceText:setFont(40)
table.insert(choiceList,choiceText)
choiceText:centerFont()
table.insert(allBoxes,box)
end
for i,choice in pairs(q.choices) do
@@ -84,16 +86,7 @@ local function index(window, q, callback)
end
local function update(dt) -- time in seconds that has passed since
-- label:fitFont()
label:centerFont()
for _, obj in pairs(choiceList) do
obj:centerFont()
-- obj:fitFont(nil, nil, {scale = 2/3})
end
confirm:fitFont(nil, nil, {scale = 2/3})
confirm:centerFont()
-- print(box.parent:getAbsolutes())
-- print(box:getAbsolutes())
end
return {