aboutsummaryrefslogtreecommitdiffstats
path: root/Gamestates/Config.lua
diff options
context:
space:
mode:
authorFallstar <fallstar@live.fr>2014-05-23 19:19:18 +0000
committerFallstar <fallstar@live.fr>2014-05-23 19:19:18 +0000
commit9182ae1642a750fd5a8a574a6bbd1a36c105d9d9 (patch)
treec952d11ccf31011785b2bc9b1ff41ddafbf3c5ab /Gamestates/Config.lua
parent12ba7de4216a435acd7958820588c27e76b150e4 (diff)
downloadMastermind-9182ae1642a750fd5a8a574a6bbd1a36c105d9d9.tar.gz
Mastermind-9182ae1642a750fd5a8a574a6bbd1a36c105d9d9.tar.bz2
Mastermind-9182ae1642a750fd5a8a574a6bbd1a36c105d9d9.tar.xz
Mastermind-9182ae1642a750fd5a8a574a6bbd1a36c105d9d9.zip
Music on menu + Mute button in Options.
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()