sonic-bluestreak/sonic-bluestreak.love/scenes/menus/debugmenus/animation/menu.lua

20 lines
560 B
Lua
Raw Permalink Normal View History

2021-11-25 10:57:13 +01:00
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