sonic-radiance/sonic-radiance.love/scenes/debug/viewers/animation/menu.lua
2021-07-04 11:43:46 +02:00

19 lines
560 B
Lua

local commons = require "scenes.debug.commons.menu"
local listMenu = require "game.modules.menus.list"
local menu = {}
menu.commons = commons
menu.AnimationWidget = listMenu.DualTextWidget:extend()
-- ShowBackground
function menu.AnimationWidget:new(scene, menuName, animName)
menu.AnimationWidget.super.new(self, scene, menuName, animName, "")
self.charName = menuName
self.animName = animName
end
function menu.AnimationWidget:action()
self.scene:setSpriteAndAnim(self.charName, self.animName)
self.scene.menusystem:deactivate()
end
return menu