summaryrefslogtreecommitdiffhomepage
path: root/config/menus
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-08-01 04:10:11 +0200
committerAki <nthirtyone@gmail.com>2017-08-01 04:10:11 +0200
commita6810abd1c8cc9956cb4b8cc2f00258780eee3a8 (patch)
treec54c0f4441bff64664c3a74bf53bf533e945486f /config/menus
parentbc625807322a7fc7f16a2c228670c85d292e878f (diff)
downloadroflnauts-a6810abd1c8cc9956cb4b8cc2f00258780eee3a8.zip
roflnauts-a6810abd1c8cc9956cb4b8cc2f00258780eee3a8.tar.gz
roflnauts-a6810abd1c8cc9956cb4b8cc2f00258780eee3a8.tar.bz2
Ingame settings now support changing display modes
Diffstat (limited to 'config/menus')
-rw-r--r--config/menus/settings.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/menus/settings.lua b/config/menus/settings.lua
index 59f9234..7102bea 100644
--- a/config/menus/settings.lua
+++ b/config/menus/settings.lua
@@ -68,8 +68,29 @@ if background == nil or not background:is(require "not.MenuBackground") then
background = require "not.MenuBackground"(menu)
end
+local displayTypes = {["fullscreen"] = "fullscreen", ["1"] = "1x", ["2"] = "2x", ["3"] = "3x", ["4"] = "4x", ["5"] = "5x"}
+local displayButton = Button(menu)
+:set("types", displayTypes)
+:setText(displayTypes[Settings.current.display])
+:setPosition(bx,64)
+:set("enabled", true)
+:set("isEnabled", function (self) return self.enabled end)
+:set("active", function (self)
+ self.parent.inputBreakTimer = 0.2
+ if Settings.current.display == "fullscreen" then
+ Settings.current.display = "1"
+ elseif Settings.current.display == "5" then
+ Settings.current.display = "fullscreen"
+ else
+ Settings.current.display = tostring(tonumber(Settings.current.display) + 1)
+ end
+ self:setText(self.types[Settings.current.display])
+ Settings.reload()
+end)
+
local a = {
background,
+ displayButton,
Button(menu)
:setText("Keyboard 1")
:setPosition(bx,80)