added zip utils
This commit is contained in:
+9
-3
@@ -5,7 +5,8 @@ local proc = gui:getProcessor():newProcessor("main-title")
|
||||
|
||||
local APP_VERSION = love.filesystem.read("version.txt")
|
||||
|
||||
local board = require("menus.board")
|
||||
local boardMenu = require("menus.board")
|
||||
local settingsMenu = require("menus.settings")
|
||||
|
||||
local titleLog = log:child("title")
|
||||
|
||||
@@ -59,16 +60,21 @@ function Menu(frame)
|
||||
play:OnReleased(function()
|
||||
titleLog:debug("Play button pressed")
|
||||
if love.filesystem.getInfo("quiz") then
|
||||
menu.getMenu("board"):visible(true, "quiz", true)
|
||||
boardMenu:visible(true, "quiz", true)
|
||||
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))
|
||||
boardMenu:visible(true, file:gsub("\\","/"):gsub(love.filesystem.getSaveDirectory(),""):sub(2,-1))
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
settings:OnReleased(function()
|
||||
titleLog:debug("Settings button pressed")
|
||||
settingsMenu:visible(true)
|
||||
end)
|
||||
|
||||
quit:OnReleased(function(self, x, y)
|
||||
print("Quit Pressed",x,y,self:getAbsolutes())
|
||||
titleLog:debug("Quit button pressed")
|
||||
|
||||
Reference in New Issue
Block a user