added refresh when working with quiz folder, debug logs enabled in folder mode, added new zoom content
This commit is contained in:
+5
-20
@@ -10,14 +10,15 @@ local label
|
||||
local imageHolder
|
||||
|
||||
local function index(window, q, callback)
|
||||
frame = window:newFrame(0,0,0,-200,0,.2,1,.8)
|
||||
frame = window:newFrame(0,0,0,0,0,.2,1,.8)
|
||||
frame.visibility = 0
|
||||
label = window:newTextLabel(" " ..q.title.. " ",0,0,0,0,0,0,1,.2)
|
||||
label.align = ALIGN_CENTER
|
||||
label.textColor = color.white
|
||||
label.color = color.new("#363ac8")
|
||||
label:scaleFont(.5)
|
||||
label:scaleFont(.4)
|
||||
label:centerFont()
|
||||
label.drawBorder = false
|
||||
if not q.image or q.image == "" then
|
||||
error("Missing 'image' field for question!")
|
||||
end
|
||||
@@ -26,24 +27,8 @@ local function index(window, q, callback)
|
||||
imageHolder:centerX(true)
|
||||
imageHolder:centerY(true)
|
||||
imageHolder:setDualDim(0,0,imageHolder.imageWidth,imageHolder.imageHeight)
|
||||
local correct = window:newTextButton("Correct",0,-200,0,100,0,1,.5)
|
||||
correct.color = color.new("#52b11b")
|
||||
local wrong = window:newTextButton("Wrong",0,-200,0,100,.5,1,.5)
|
||||
wrong.color = color.new("#bd2626")
|
||||
local skip = window:newTextButton("Skip",0,-100,0,100,.25,1,.5)
|
||||
skip.color = color.new("#5d5d5d")
|
||||
window.apply({
|
||||
scaleFont={.7},
|
||||
centerFont={},
|
||||
align=window.ALIGN_CENTER,
|
||||
OnReleased=function(self)
|
||||
if self.text == "Skip" then
|
||||
callback()
|
||||
return
|
||||
end
|
||||
callback(self.text == "Correct")
|
||||
end,
|
||||
},correct,wrong,skip)
|
||||
|
||||
useDefaultHandler(callback)
|
||||
end
|
||||
|
||||
local function update(dt) -- time in seconds that has passed since
|
||||
|
||||
Reference in New Issue
Block a user