36 lines
917 B
Lua
36 lines
917 B
Lua
local ListBox = require "birb.modules.menusystem.listbox"
|
|
local TweenManager = require "game.modules.tweenmanager"
|
|
|
|
local RadianceMenu = ListBox:extend()
|
|
|
|
function RadianceMenu:new(scene, name, x, y, w, h, itemNumber)
|
|
self.scene = scene
|
|
self.tweens = TweenManager(self)
|
|
RadianceMenu.super.new(self, self.scene.menusystem, name, x, y, w, h, itemNumber)
|
|
end
|
|
|
|
function RadianceMenu:update(dt)
|
|
self.tweens:update(dt)
|
|
RadianceMenu.super.update(self, dt)
|
|
end
|
|
|
|
function RadianceMenu:moveFrom(x, y)
|
|
local newX, newY = self.x, self.y
|
|
self.x, self.y = x, y
|
|
|
|
self.tweens:addTween(0, 0.3, {x = newX, y = newY}, "inOutQuad")
|
|
end
|
|
|
|
function RadianceMenu:moveTo(newX, newY)
|
|
self.tweens:addTween(0, 0.3, {x = newX, y = newY}, "inOutQuad")
|
|
end
|
|
|
|
function RadianceMenu:getCenter()
|
|
return self.x + self.width, self.y + self.height
|
|
end
|
|
|
|
function RadianceMenu:activationAction()
|
|
-- Do nothing
|
|
end
|
|
|
|
return RadianceMenu
|