b5c6cf0b1f
Fix #12
31 lines
956 B
Lua
31 lines
956 B
Lua
local commons = require "scenes.debug.commons.menu"
|
|
local menu = {}
|
|
menu.commons = commons
|
|
menu.ShowBackgroundWidget = menu.commons.DebugWidget:extend()
|
|
menu.HeroChoregraphyWidget = 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
|
|
|
|
-- ShowBackground
|
|
function menu.HeroChoregraphyWidget:new(scene, charName, skillData)
|
|
menu.HeroChoregraphyWidget.super.new(self, scene, charName, skillData.name)
|
|
self.character = charName
|
|
self.skillData = skillData
|
|
end
|
|
|
|
function menu.HeroChoregraphyWidget:action()
|
|
self.scene:playHeroChoregraphy(self.character, self.skillData)
|
|
self.scene.menusystem:deactivate()
|
|
end
|
|
|
|
|
|
return menu
|