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
+4 -2
View File
@@ -16,6 +16,8 @@ local function index(window, q, callback)
label.align = ALIGN_CENTER
label.textColor = color.white
label.color = color.new("#363ac8")
label:scaleFont(.5)
label:centerFont()
if not q.image or q.image == "" then
error("Missing 'image' field for question!")
end
@@ -31,7 +33,8 @@ local function index(window, q, callback)
local skip = window:newTextButton("Skip",0,-100,0,100,.25,1,.5)
skip.color = color.new("#5d5d5d")
window.apply({
fitFont={},
scaleFont={.7},
centerFont={},
align=window.ALIGN_CENTER,
OnReleased=function(self)
if self.text == "Skip" then
@@ -47,7 +50,6 @@ local function update(dt) -- time in seconds that has passed since
_,_,w,h = imageHolder.parent:getAbsolutes()
local x,y,w,h = imageHolder:GetSizeAdjustedToAspectRatio(w,h)
imageHolder:setDualDim(w,h,x,y)
label:fitFont()
end
return {