sonic-radiance/sonic-radiance.love/scenes/debug/viewers/battleBack/menu.lua
2020-08-01 14:01:08 +02:00

18 lines
520 B
Lua

local commons = require "scenes.debug.commons.menu"
local menu = {}
menu.commons = commons
menu.ShowBackgroundWidget = menu.commons.DebugWidget: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