Files
StellaSora_DataLua/lua/game/ui/disc/discnotelayerctrl.lua
T
SL1900 5e0d58cfad Initial version - 1.2.0.60
EN: 1.2.0.60
CN: 1.2.0.61
JP: 1.2.0.63
KR: 1.2.0.67
2025-12-03 01:00:00 +09:00

30 lines
1.0 KiB
Lua

local DiscNoteLayerCtrl = class("DiscNoteLayerCtrl", BaseCtrl)
DiscNoteLayerCtrl._mapNodeConfig = {
imgLine = {},
goNote = {
sCtrlName = "Game.UI.TemplateEx.TemplateDiscMultiNoteCtrl"
},
txtLayerDesc = {sComponentName = "TMP_Text"},
txtLayerName = {sComponentName = "TMP_Text"},
TMP_Link = {
sNodeName = "txtLayerDesc",
sComponentName = "TMPHyperLink",
callback = "OnLinkClick_Word"
}
}
DiscNoteLayerCtrl._mapEventConfig = {}
function DiscNoteLayerCtrl:Refresh(tbNoteId, nNoteCount, sDesc, nLayer, bLast)
self._mapNode.goNote:SetNoteItem(tbNoteId, nNoteCount)
NovaAPI.SetTMPText(self._mapNode.txtLayerDesc, sDesc)
local sLayer = ConfigTable.GetUIText("Disc_CoreSkill_Base")
if 1 < nLayer then
sLayer = orderedFormat(ConfigTable.GetUIText("Disc_CoreSkill_Expand"), nLayer - 1)
end
NovaAPI.SetTMPText(self._mapNode.txtLayerName, sLayer)
self._mapNode.imgLine:SetActive(not bLast)
end
function DiscNoteLayerCtrl:OnLinkClick_Word(link, sWordId)
UTILS.ClickWordLink(link, sWordId)
end
return DiscNoteLayerCtrl