sonic-bluestreak/sonic-bluestreak.love/scenes/menus/debugmenus/battleBack/menu.lua
2021-11-25 10:57:13 +01:00

19 lines
574 B
Lua

local commons = require "scenes.menus.commons.menu"
local listMenu = require "game.modules.menus.list"
local menu = {}
menu.commons = commons
menu.ShowBackgroundWidget = listMenu.DualTextWidget:extend()
-- ShowBackground
function menu.ShowBackgroundWidget:new(scene, menuName, backgroundName, backgroundId)
menu.ShowBackgroundWidget.super.new(self, scene, menuName, backgroundName, "")
self.backgroundId = backgroundId
end
function menu.ShowBackgroundWidget:action()
self.scene:setBackground(self.backgroundId)
self.scene.menusystem:deactivate()
end
return menu