mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 17:39:03 -06:00
Touched up screenshotting a bit
This commit is contained in:
parent
ba235c8a41
commit
83de216408
4
main.lua
4
main.lua
@ -150,7 +150,9 @@ function love.keypressed(key, scancode)
|
|||||||
-- f12 is reserved for saving screenshots
|
-- f12 is reserved for saving screenshots
|
||||||
elseif scancode == "f12" then
|
elseif scancode == "f12" then
|
||||||
local ss_name = os.date("ss/%Y-%m-%d_%H-%M-%S.png")
|
local ss_name = os.date("ss/%Y-%m-%d_%H-%M-%S.png")
|
||||||
if not love.filesystem.getInfo("ss") then
|
local info = love.filesystem.getInfo("ss")
|
||||||
|
if not info or info.type ~= "directory" then
|
||||||
|
love.filesystem.remove("ss")
|
||||||
love.filesystem.createDirectory("ss")
|
love.filesystem.createDirectory("ss")
|
||||||
end
|
end
|
||||||
print("Saving screenshot as "..ss_name)
|
print("Saving screenshot as "..ss_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user