diff options
author | Aki <nthirtyone@gmail.com> | 2016-10-06 14:43:11 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-10-06 14:43:11 +0200 |
commit | 35262a7245bcd9ebf937d07ab3326655d96e5d2e (patch) | |
tree | 8c0edb0e58712dbc661d84cd988f6d2a82cb2e14 /config | |
parent | 9f1854ed3365eacec0b49017d619eb02ab0f52fb (diff) | |
download | roflnauts-35262a7245bcd9ebf937d07ab3326655d96e5d2e.zip roflnauts-35262a7245bcd9ebf937d07ab3326655d96e5d2e.tar.gz roflnauts-35262a7245bcd9ebf937d07ab3326655d96e5d2e.tar.bz2 |
Fixed scaling of fullscreen menu in different ratios
Diffstat (limited to 'config')
-rw-r--r-- | config/menuhost.lua | 2 | ||||
-rw-r--r-- | config/menumain.lua | 6 | ||||
-rw-r--r-- | config/menuselect.lua | 2 | ||||
-rw-r--r-- | config/menusettings.lua | 10 |
4 files changed, 15 insertions, 5 deletions
diff --git a/config/menuhost.lua b/config/menuhost.lua index bd7a3b9..af7dad1 100644 --- a/config/menuhost.lua +++ b/config/menuhost.lua @@ -28,7 +28,7 @@ return { return map_selector:isLocked() end) :set("active", function (self) - MAP = map_selector:getFullSelection(true)[1][1] + MAP = map_selector:getFullSelection(true)[1][1] -- please, don't kill me for this, kek self.parent:load("menuselect") end) , diff --git a/config/menumain.lua b/config/menumain.lua index 70666b3..e312b51 100644 --- a/config/menumain.lua +++ b/config/menumain.lua @@ -4,7 +4,7 @@ local button = require "button" local header = require "header" local element = require "element" -local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale() +local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() local bx = width/2-29 return { @@ -25,8 +25,8 @@ return { button:new(menu) :setText("Settings") :setPosition(bx, 112) - :set("isEnabled", function (self) - return false + :set("active", function (self) + self.parent:load("menusettings") end) , button:new(menu) diff --git a/config/menuselect.lua b/config/menuselect.lua index c79396c..19f46ab 100644 --- a/config/menuselect.lua +++ b/config/menuselect.lua @@ -4,7 +4,7 @@ local button = require "button" local selector = require "selector" local element = require "element" -local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale() +local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() local bx = width/2-29 local naut_selector = selector:new(menu) diff --git a/config/menusettings.lua b/config/menusettings.lua index fc7d62e..380828d 100644 --- a/config/menusettings.lua +++ b/config/menusettings.lua @@ -5,3 +5,13 @@ local selector = require "selector" local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale() local bx = width/2-29 + +return { + button:new(menu) + :setText("Go back") + :setPosition(bx,117) + :set("active", function (self) + self.parent:load("menumain") + end) + , +}
\ No newline at end of file |