sonic-radiance/sonic-radiance.love/scenes/menus/debugmenus/animation/menu.lua
2021-08-15 16:26:05 +02:00

19 lines
560 B
Lua

local commons = require "scenes.menus.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