diff options
| author | 1029chris <1029chris@gmail.com> | 2017-02-14 15:55:44 -0800 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2017-02-14 15:55:44 -0800 |
| commit | dcf61eedc3f19af5a98ffd78439306ffe205ad77 (patch) | |
| tree | d8154b113e47b15c150516310b0f7792275b63b7 /settings.lua | |
| parent | b093ea581294319fff10025501e09b90c4af3926 (diff) | |
Added save game/load game system
game auto saves when fight ends
Diffstat (limited to 'settings.lua')
| -rw-r--r-- | settings.lua | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/settings.lua b/settings.lua index 5d5a603..cdb0484 100644 --- a/settings.lua +++ b/settings.lua @@ -49,9 +49,9 @@ function drawSettings() drawDownBox(8, 305, 384/2-4, 25, 2) love.graphics.setColor(colors.font.dark) love.graphics.print("Difficulty", 14, 313) - drawDownBox(8, 340, 384/2-4, 198, 2) + drawDownBox(8, 340, 384/2-4, 122, 2) love.graphics.setColor(255,255,255) - love.graphics.rectangle("fill", 9, 341, 384/2-6, 196) + love.graphics.rectangle("fill", 9, 341, 384/2-6, 120) for i=1,6 do drawDiSel(i) end @@ -64,6 +64,13 @@ function drawSettings() for i=1,#stre do drawReSel(i) end + drawUpBox(8, 467, 384/2-4, 23, 2) + drawUpBox(8, 492, 384/2-4, 23, 2) + drawUpBox(8, 517, 384/2-4, 23, 2) + love.graphics.setColor(colors.font.dark) + love.graphics.print("Erase Save File", 14, 475) + love.graphics.print("Erase Profile", 14, 500) + love.graphics.print("Erase Both", 14, 525) end function stencilBg() love.graphics.rectangle("fill", 88-64, 44+32, 152, 120) @@ -102,6 +109,22 @@ function drawReSel(i) end end function updateSettings() + if mouseClick(win[6].x+8, win[6].y+467, 384/2-4, 23) == true and layer[1] == 6 then + love.audio.stop() + love.filesystem.remove("savefile.txt") + loadRe() + end + if mouseClick(win[6].x+8, win[6].y+492, 384/2-4, 23) == true and layer[1] == 6 then + love.audio.stop() + love.filesystem.remove("profile.txt") + loadRe() + end + if mouseClick(win[6].x+8, win[6].y+517, 384/2-4, 23) == true and layer[1] == 6 then + love.audio.stop() + love.filesystem.remove("savefile.txt") + love.filesystem.remove("profile.txt") + loadRe() + end for i=1,6 do if (layer[1] == 6 and win[6].hover == true and sys.mouse.p.p == true and sys.mouse.drag == false and sys.mouse.p.x >= win[6].x+263 and sys.mouse.p.x <= win[6].x+263+120 and |
