summaryrefslogtreecommitdiffhomepage
path: root/config/menus/pause.lua
diff options
context:
space:
mode:
Diffstat (limited to 'config/menus/pause.lua')
-rw-r--r--config/menus/pause.lua24
1 files changed, 20 insertions, 4 deletions
diff --git a/config/menus/pause.lua b/config/menus/pause.lua
index 74dd043..60aa2fc 100644
--- a/config/menus/pause.lua
+++ b/config/menus/pause.lua
@@ -1,19 +1,35 @@
local menu = ...
local Button = require "not.Button"
+local Element = require "not.Element"
local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale()
local bx = width/2-29
return {
+ Element(menu)
+ :set("draw", function (self, scale)
+ love.graphics.setColor(0, 0, 0, 110)
+ local width, height = love.graphics.getWidth(), love.graphics.getHeight()
+ love.graphics.rectangle("fill", 0, 0, width, height)
+ end)
+ ,
Button(menu)
:setText("Unpause")
- :setPosition(bx, height - 36)
- :set("active", function () end)
+ :setPosition(bx, height - 38)
+ :set("active", function (self)
+ sceneManager:removeTopScene()
+ local scene = sceneManager:getAllScenes()[1]
+ scene:setSleeping(false)
+ scene:setInputDisabled(false)
+ end)
,
Button(menu)
:setText("Exit")
- :setPosition(bx, height - 20)
- :set("active", function () end)
+ :setPosition(bx, height - 22)
+ :set("active", function (self)
+ sceneManager:removeTopScene()
+ sceneManager:changeScene(Menu("main"))
+ end)
,
}