sonic-radiance/sonic-radiance.love/scenes/menus/options/menu.lua

16 lines
467 B
Lua
Raw Normal View History

local RadianceListMenu = require "game.modules.menus.list"
2020-08-02 13:47:27 +02:00
local OptionMenu = RadianceListMenu.ListMenu:extend()
local WIDTH = 128+32
local ITEMNUMBER = 6
function OptionMenu:new(scene, name)
local w, h = math.floor(WIDTH), math.floor(16 * ITEMNUMBER)
local screenw, screenh = core.screen:getDimensions()
local x = (screenw/2) - (w/2)
local y = (screenh/2) - (h/2)
OptionMenu.super.new(self, scene, name, x, y, w, ITEMNUMBER, true)
end
return OptionMenu