20 lines
560 B
Lua
20 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
|