aboutsummaryrefslogtreecommitdiffstats
path: root/Gamestates/Config.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Gamestates/Config.lua')
-rw-r--r--Gamestates/Config.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/Gamestates/Config.lua b/Gamestates/Config.lua
index 394b115..a64650e 100644
--- a/Gamestates/Config.lua
+++ b/Gamestates/Config.lua
@@ -33,6 +33,8 @@ function Config:enter()
Previous = "Gamestates/Menu"
end
+
+
function Config:update(dt)
Gui.group.push{grow = "down", pos = {Utils.percentCoordinates(20, 20)}}
Gui.Label{text = "Player name", size = {Utils.percentCoordinates(10, 10)}}
@@ -40,9 +42,20 @@ function Config:update(dt)
if Gui.Button{text = "Save", size = {Utils.percentCoordinates(60, 10)}} then
love.filesystem.write( "userConfig", "PLAYERNAME: " .. Config.player_name.text) -- Write the new name to the config file
end
+ if Gui.Button{text = "Mute", size = {Utils.percentCoordinates(40, 10)}} then
+ if Mute == false then
+ Mute = true
+ Menu.Music:stop()
+ else
+ Mute = false
+ Menu.Music:play()
+ end
+ end
Gui.group.pop{}
end
+
+
-- Quickie's functions
function Config:draw()
Gui.core.draw()