added logging support

This commit is contained in:
2026-06-08 20:29:59 -07:00
parent 0c90ab885e
commit 6b864a2d9b
15 changed files with 1736 additions and 1073 deletions
+7
View File
@@ -7,12 +7,15 @@ local APP_VERSION = love.filesystem.read("version.txt")
local board = require("menus.board")
local titleLog = log:child("title")
function Menu(frame)
local background = frame:newImageLabel("assets/images/background.jpg")
background:fullFrame()
local title = background:newTextLabel("Jeopardy",0,0,0,0,0,.1,1,.25)
title:setFont("assets/fonts/gyparody.ttf",300)
titleLog:debug("Setting title shader")
title:setShader(gui.SHADERS.vignette,{
intensity = .5,
smoothness = .8
@@ -23,6 +26,7 @@ function Menu(frame)
title.textColor = color.title_font
title.drawBorder = false
titleLog:debug("Creating font thread")
proc:newThread(function()
local function enabled()
return background.visible
@@ -64,17 +68,20 @@ function Menu(frame)
},play,settings,quit)
play:OnReleased(function()
titleLog:debug("Play button pressed")
if love.filesystem.getInfo("quiz") then
menu.getMenu("board"):visible(true, "quiz")
return
else
gui:newFilePicker("File picker test",nil, {".zip"}, function(file)
titleLog:info("File picked: %s", file)
menu.getMenu("board"):visible(true, file:gsub("\\","/"):gsub(love.filesystem.getSaveDirectory(),""):sub(2,-1))
end)
end
end)
quit:OnReleased(function()
titleLog:debug("Quit button pressed")
local f = frame:newFrame()
f:fullFrame()
f.visibility = .8