summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/menumain.lua12
-rw-r--r--config/menustart.lua5
2 files changed, 16 insertions, 1 deletions
diff --git a/config/menumain.lua b/config/menumain.lua
index 629284c..24f66ef 100644
--- a/config/menumain.lua
+++ b/config/menumain.lua
@@ -2,6 +2,7 @@ local menu = ...
local button = require "button"
local header = require "header"
+local element = require "element"
local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale()
local button_x = width/2-29
@@ -31,6 +32,17 @@ return {
:setPosition(button_x, 144)
:set("active", love.event.quit)
,
+ element:new(menu)
+ :setPosition(width/2, 15)
+ :set("sprite", love.graphics.newImage("assets/two.png"))
+ :set("draw", function (self, scale)
+ local x,y = self:getPosition()
+ love.graphics.setColor(255, 255, 255, 255)
+ love.graphics.setFont(Bold)
+ love.graphics.print("1", (x-17)*scale, y*scale, 0, scale*2, scale*2, 12)
+ love.graphics.print("1", (x+13)*scale, y*scale, 0, scale*2, scale*2, 12)
+ end)
+ ,
header:new(menu)
:setText("Roflnauts")
:setPosition(width/2,40)
diff --git a/config/menustart.lua b/config/menustart.lua
index 2472df5..1830f0d 100644
--- a/config/menustart.lua
+++ b/config/menustart.lua
@@ -1,11 +1,14 @@
local menu = ...
local button = require "button"
+local selector = require "selector"
+
+local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale()
return {
button:new(menu)
:setText("Go back")
- :setPosition(10,40)
+ :setPosition(10,height-25)
:set("active", function (self)
self.parent:load("menumain")
end)