aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2017-03-14 20:18:14 -0700
committer1029chris <1029chris@gmail.com>2017-03-14 20:18:14 -0700
commit7cbf411a91fc594f9a71016d2e90e27ab208e019 (patch)
tree0e9e01aeabc35ec93cb7c8258eb2e26bffbdeb91
parent5daf2309272fc3d413f230514534d550c6bd2e33 (diff)
Adjusted the save fileHEADmaster
removed profile added "are you sure" thing before erasing save
-rw-r--r--loading.lua5
-rw-r--r--settings.lua45
-rw-r--r--var.lua7
3 files changed, 26 insertions, 31 deletions
diff --git a/loading.lua b/loading.lua
index 26657c2..10b19c2 100644
--- a/loading.lua
+++ b/loading.lua
@@ -60,11 +60,6 @@ function loadSave()
loadGame = love.filesystem.load("savegame.txt")
loadGame()
end
- if love.filesystem.exists("profile.txt") == true then
- loadProfile = love.filesystem.load("profile.txt")
- loadProfile()
- profile.setup = true
- end
end
function bool2str(bool)
if bool == false then
diff --git a/settings.lua b/settings.lua
index 68db83b..3c29221 100644
--- a/settings.lua
+++ b/settings.lua
@@ -64,13 +64,18 @@ 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)
+ drawUpBox(8, 467+5, 384/2-4, 23, 2)
+ if eraseGame == false then
+ love.graphics.setColor(colors.font.dark)
+ love.graphics.print("Erase Save File", 14, 475+5)
+ else
+ drawUpBox(30, 507, 60, 28, 2)
+ drawUpBox(110, 507, 60, 28, 2)
+ love.graphics.setColor(colors.font.dark)
+ love.graphics.print("Are you sure?", 24, 475+5)
+ love.graphics.print("Yes", 41, 517)
+ love.graphics.print("No", 128, 517)
+ end
end
function stencilBg()
love.graphics.rectangle("fill", 88-64, 44+32, 152, 120)
@@ -109,21 +114,19 @@ 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()
- resetGameFile()
- 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()
+ if mouseClick(win[6].x+8, win[6].y+467+5, 384/2-4, 23) == true and layer[1] == 6 then
+ eraseGame = true
+ win[6].update = true
end
- if mouseClick(win[6].x+8, win[6].y+517, 384/2-4, 23) == true and layer[1] == 6 then
- love.audio.stop()
- resetGameFile()
- love.filesystem.remove("profile.txt")
- loadRe()
+ if eraseGame == true then
+ if mouseClick(win[6].x+30, win[6].y+507, 60, 28) == true and layer[1] == 6 then
+ love.audio.stop()
+ resetGameFile()
+ loadRe()
+ elseif mouseClick(win[6].x+110, win[6].y+507, 60, 28) == true and layer[1] == 6 then
+ eraseGame = false
+ win[6].update = true
+ end
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
diff --git a/var.lua b/var.lua
index b1800cf..5b4138c 100644
--- a/var.lua
+++ b/var.lua
@@ -135,11 +135,6 @@ function loadVar()
internet.load = 0
internet.blinkTimer = 0
internet.blink = false
- profile = {}
- profile.setup = false
- profile.name = "No Name"
- profile.gender = "Person"
- profile.pronoun = {they,them,their}
v1.yes = false
v1.timer = 0
v1.shakemin = 0
@@ -297,6 +292,7 @@ function loadVar()
expl.deb[3].r = math.rad(0)
expl.deb[3].rm = math.rad(1)
expl.deb.load = false
+ eraseGame = false
std = {}
std[1] = {}
std[1].title = "Baby"
@@ -429,6 +425,7 @@ function loadPre()
end
function loadRe()
loading = 0
+ sys.mouse.p.p = false
fade = 0
loaded = true
loadingId = 1