added logging support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user