FreeKill/lua/ui_emu/common.lua
notify 30df075db2
Some checks failed
Check Whitespace and New Line / check (push) Has been cancelled
Deploy Doxygen to Pages / build (push) Has been cancelled
Deploy Doxygen to Pages / deploy (push) Has been cancelled
Changelog: v0.4.20
2024-10-22 01:14:01 +08:00

30 lines
676 B
Lua

local base = require 'ui_emu.base'
local SelectableItem = base.SelectableItem
---@class CardItem: SelectableItem
local CardItem = SelectableItem:subclass("CardItem")
---@class Photo: SelectableItem
---@field public state string
local Photo = SelectableItem:subclass("Photo")
function Photo:initialize(scene, id)
SelectableItem.initialize(self, scene, id)
self.state = "normal"
end
function Photo:toData()
local ret = SelectableItem.toData(self)
ret.state = self.state
return ret
end
---@class SkillButton: SelectableItem
local SkillButton = SelectableItem:subclass("SkillButton")
return {
CardItem = CardItem,
Photo = Photo,
SkillButton = SkillButton,
}