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
This commit is contained in:
SL1900
2025-12-03 01:00:00 +09:00
commit 5e0d58cfad
3595 changed files with 9373562 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
local NoteListBtnCtrl = class("NoteListBtnCtrl", BaseCtrl)
NoteListBtnCtrl._mapNodeConfig = {
btnItem = {
sComponentName = "UIButton",
callback = "OnBtnClick_Item"
},
imgNoteIcon = {sComponentName = "Image"},
imgIconMask = {sComponentName = "Image"},
txtNoteName = {sComponentName = "TMP_Text"},
imgChoose = {},
txtLv = {sComponentName = "TMP_Text"},
txtNotHave = {
sComponentName = "TMP_Text",
sLanguageId = "StarTower_Depot_Potential_Lock"
}
}
NoteListBtnCtrl._mapEventConfig = {
SelectNoteListBtn = "OnEvent_SelectNoteListBtn"
}
function NoteListBtnCtrl:SetItem(noteCfg, nLv)
self.nNoteId = noteCfg.Id
self.nLv = nLv
self:SetPngSprite(self._mapNode.imgNoteIcon, noteCfg.Icon .. AllEnum.DiscSkillIconSurfix.Small)
self:SetPngSprite(self._mapNode.imgIconMask, noteCfg.Icon .. AllEnum.DiscSkillIconSurfix.Small)
NovaAPI.SetTMPText(self._mapNode.txtNoteName, noteCfg.Name)
NovaAPI.SetTMPText(self._mapNode.txtLv, "Lv." .. nLv)
if nLv <= 0 then
self._mapNode.imgIconMask.gameObject:SetActive(true)
self._mapNode.txtLv.gameObject:SetActive(false)
self._mapNode.txtNotHave.gameObject:SetActive(true)
end
end
function NoteListBtnCtrl:OnEvent_SelectNoteListBtn(nNoteId, _)
self._mapNode.imgChoose.gameObject:SetActive(self.nNoteId == nNoteId)
end
function NoteListBtnCtrl:OnBtnClick_Item()
EventManager.Hit("SelectNoteListBtn", self.nNoteId, self.nLv)
end
return NoteListBtnCtrl
@@ -0,0 +1,54 @@
local NotePreviewNodeCtrl = class("NotePreviewNodeCtrl", BaseCtrl)
NotePreviewNodeCtrl._mapNodeConfig = {
advanceNodeAnim = {sNodeName = "adNode", sComponentName = "Animator"},
advanceNode_gray = {},
txtAD = {nCount = 2, sComponentName = "TMP_Text"},
txtAdNode = {
sComponentName = "TMP_Text",
sLanguageId = "Advance_Name"
},
txtAdNodeGray = {
sComponentName = "TMP_Text",
sLanguageId = "Advance_Name"
},
Select = {},
redDotNode = {}
}
NotePreviewNodeCtrl._mapEventConfig = {}
function NotePreviewNodeCtrl:RefreshNode(nAdvance, nCurAdvance, bSelect)
self.bSelect = false
self.nAdvance = nAdvance
self.nCurAdvance = nCurAdvance
self._mapNode.Select.gameObject:SetActive(false)
self._mapNode.advanceNode_gray.gameObject:SetActive(nCurAdvance < nAdvance)
for _, v in ipairs(self._mapNode.txtAD) do
NovaAPI.SetTMPText(v, nAdvance)
end
if bSelect ~= nil and bSelect == true then
self.bSelect = true
self._mapNode.Select.gameObject:SetActive(true)
self:PlayAnim("Node_idle")
self.animState = "Node_idle"
end
end
function NotePreviewNodeCtrl:PlayAnim(sAnimName)
self._mapNode.advanceNodeAnim:Play(sAnimName)
end
function NotePreviewNodeCtrl:SetSelect(bSelect)
if self.bSelect and not bSelect then
self:PlayAnim("Node_out")
self.animState = "Node_out"
end
self.bSelect = bSelect
self._mapNode.Select.gameObject:SetActive(bSelect)
if bSelect and self.animState ~= "Node_idle" then
self:PlayAnim("Node_in")
self.animState = "Node_idle"
if self.nAdvance <= self.nCurAdvance then
CS.WwiseAudioManager.Instance:PlaySound("ui_charinfo_levelup_select_button")
end
end
end
function NotePreviewNodeCtrl:OnDisable()
end
return NotePreviewNodeCtrl
+176
View File
@@ -0,0 +1,176 @@
local NoteSkillCtrl = class("NoteSkillCtrl", BaseCtrl)
NoteSkillCtrl._mapNodeConfig = {
aniBlur = {sComponentName = "Animator"},
aniBlur2 = {sComponentName = "Animator"},
btnBlur = {
sNodeName = "snapshot",
sComponentName = "Button",
callback = "OnBtnClick_Close"
},
btnBlur2 = {
sNodeName = "snapshot2",
sComponentName = "Button",
callback = "OnBtnClick_Close"
},
window = {},
aniWindow = {sNodeName = "window", sComponentName = "Animator"},
txtWindowTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Note_SkillTitle"
},
btnClose = {
sComponentName = "UIButton",
callback = "OnBtnClick_Close"
},
txtSkillTitle = {sComponentName = "TMP_Text"},
txtSkillDesc = {sComponentName = "TMP_Text"},
txtSkillLevel = {sComponentName = "TMP_Text"},
imgSkillIcon = {sComponentName = "Image"},
btnPrev = {
sComponentName = "UIButton",
callback = "OnBtnClick_Prev"
},
btnNext = {
sComponentName = "UIButton",
callback = "OnBtnClick_Next"
},
imgPrevOn = {},
imgPrevOff = {},
imgNextOn = {},
imgNextOff = {},
sv = {
sComponentName = "LoopScrollView"
}
}
NoteSkillCtrl._mapEventConfig = {}
function NoteSkillCtrl:Open()
self._mapNode.aniBlur.gameObject:SetActive(self.bBlur)
self._mapNode.aniBlur2.gameObject:SetActive(not self.bBlur)
self:InitData()
self:PlayInAni()
self:Refresh()
end
function NoteSkillCtrl:InitData()
self.tbNoteId = {}
local i = 1
for nId, nCount in pairs(self.tbNote) do
if 0 < nCount then
table.insert(self.tbNoteId, nId)
if nId == self.nSelectNote then
self.nSelectIndex = i
end
i = i + 1
end
end
self.nListCount = #self.tbNoteId
self._mapNode.imgPrevOn:SetActive(1 < self.nListCount)
self._mapNode.imgPrevOff:SetActive(1 >= self.nListCount)
self._mapNode.imgNextOn:SetActive(1 < self.nListCount)
self._mapNode.imgNextOff:SetActive(1 >= self.nListCount)
end
function NoteSkillCtrl:Refresh()
local mapCfg = ConfigTable.GetData("SubNoteSkill", self.nSelectNote)
if not mapCfg then
return
end
NovaAPI.SetTMPText(self._mapNode.txtSkillTitle, mapCfg.Name)
NovaAPI.SetTMPText(self._mapNode.txtSkillDesc, mapCfg.BriefDesc)
NovaAPI.SetTMPText(self._mapNode.txtSkillLevel, orderedFormat(ConfigTable.GetUIText("StarTower_Disc_Info_Level"), self.tbNote[self.nSelectNote]))
self:SetPngSprite(self._mapNode.imgSkillIcon, mapCfg.Icon)
if self.nMaxLevel < 0 then
return
end
self._mapNode.sv:Init(self.nMaxLevel, self, self.OnGridRefresh, self.OnGridBtnClick)
end
function NoteSkillCtrl:OnGridRefresh(goGrid, gridIndex)
local nIndex = gridIndex + 1
local rtGrid = goGrid.transform:Find("btnGrid/AnimRoot")
local txtLevel = rtGrid.transform:Find("layout/txtLevel"):GetComponent("TMP_Text")
local txtLevelDesc = rtGrid.transform:Find("layout/txtLevelDesc"):GetComponent("TMP_Text")
local imgSelect = rtGrid.transform:Find("imgSelect").gameObject
local imgOnBg = rtGrid.transform:Find("imgOnBg").gameObject
local imgOffBg = rtGrid.transform:Find("imgOffBg").gameObject
local imgOn = rtGrid.transform:Find("layout/imgOn").gameObject
local imgOff = rtGrid.transform:Find("layout/imgOff").gameObject
NovaAPI.SetTMPText(txtLevel, orderedFormat(ConfigTable.GetUIText("StarTower_Disc_Info_Level"), nIndex))
local bOn = nIndex == self.tbNote[self.nSelectNote]
imgSelect:SetActive(bOn)
imgOnBg:SetActive(bOn)
imgOn:SetActive(bOn)
imgOffBg:SetActive(not bOn)
imgOff:SetActive(not bOn)
local mapCfg = ConfigTable.GetData("SubNoteSkill", self.nSelectNote)
if not mapCfg then
return
end
NovaAPI.SetTMPText(txtLevelDesc, UTILS.ParseDesc(mapCfg, nil, nil, false, nIndex))
end
function NoteSkillCtrl:OnGridBtnClick(goGrid, gridIndex)
local nIndex = gridIndex + 1
end
function NoteSkillCtrl:PlayInAni()
self._mapNode.window:SetActive(true)
self._mapNode.aniWindow:Play("t_window_04_t_in")
EventManager.Hit(EventId.TemporaryBlockInput, 0.3)
end
function NoteSkillCtrl:PlayOutAni()
if self.bBlur then
self._mapNode.aniWindow:Play("t_window_04_t_out")
self._mapNode.aniBlur:SetTrigger("tOut")
self:AddTimer(1, 0.2, "Close", true, true, true)
EventManager.Hit(EventId.TemporaryBlockInput, 0.2)
else
self._mapNode.aniBlur2.gameObject:SetActive(false)
self:Close()
end
end
function NoteSkillCtrl:Close()
self._mapNode.window:SetActive(false)
EventManager.Hit(EventId.ClosePanel, PanelId.NoteSkill)
end
function NoteSkillCtrl:Awake()
self._mapNode.window:SetActive(false)
self.bBlur = true
self.nMaxLevel = ConfigTable.GetConfigNumber("DiscSubNoteSkillMaxLevel")
local tbParam = self:GetPanelParam()
if type(tbParam) == "table" then
self.tbNote = tbParam[1]
self.nSelectNote = tbParam[2]
if tbParam[3] ~= nil then
self.bBlur = tbParam[3]
end
end
end
function NoteSkillCtrl:OnEnable()
self:Open()
end
function NoteSkillCtrl:OnDisable()
end
function NoteSkillCtrl:OnDestroy()
end
function NoteSkillCtrl:OnBtnClick_Close()
self:PlayOutAni()
end
function NoteSkillCtrl:OnBtnClick_Prev()
if self.nListCount <= 1 then
return
end
self.nSelectIndex = self.nSelectIndex - 1
if 1 > self.nSelectIndex then
self.nSelectIndex = self.nListCount
end
self.nSelectNote = self.tbNoteId[self.nSelectIndex]
self:Refresh()
end
function NoteSkillCtrl:OnBtnClick_Next()
if self.nListCount <= 1 then
return
end
self.nSelectIndex = self.nSelectIndex + 1
if self.nSelectIndex > self.nListCount then
self.nSelectIndex = 1
end
self.nSelectNote = self.tbNoteId[self.nSelectIndex]
self:Refresh()
end
return NoteSkillCtrl
+156
View File
@@ -0,0 +1,156 @@
local NoteSkillInfoCtrl = class("NoteSkillInfoCtrl", BaseCtrl)
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
NoteSkillInfoCtrl._mapNodeConfig = {
blur = {
sNodeName = "t_fullscreen_blur_blue"
},
aniBlur = {
sNodeName = "t_fullscreen_blur_blue",
sComponentName = "Animator"
},
btnCloseDatail = {
sNodeName = "snapshot",
sComponentName = "Button",
callback = "OnBtnClick_Close"
},
window = {},
aniWindow = {sNodeName = "window", sComponentName = "Animator"},
txtWindowTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Note_SkillTitle"
},
txtMainDiscTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Note_Skill_Name_Title"
},
btnClose = {
sComponentName = "UIButton",
callback = "OnBtnClick_Close"
},
txtSkillTitle = {sComponentName = "TMP_Text"},
txtSkillDesc = {sComponentName = "TMP_Text"},
txtSkillLevel = {sComponentName = "TMP_Text"},
imgSkillIcon = {sComponentName = "Image"},
NoteSkillBtnItem = {},
sv = {
sComponentName = "LoopScrollView"
},
goNoteContent = {
sComponentName = "RectTransform"
},
goNoteSkillListContent = {
sComponentName = "RectTransform"
},
ActionBar = {
sCtrlName = "Game.UI.ActionBar.ActionBarCtrl"
},
btnShortcutClose = {
sComponentName = "NaviButton",
callback = "OnBtnClick_Close"
}
}
NoteSkillInfoCtrl._mapEventConfig = {
SelectNoteListBtn = "OnEvent_SelectNoteListBtn"
}
local sNotHaveColor = "<color=#B2BFCC>"
function NoteSkillInfoCtrl:Open()
self._mapNode.blur:SetActive(true)
self:PlayInAni()
self:Refresh(self.tbNote)
end
function NoteSkillInfoCtrl:Refresh(mapNote)
for k, v in ipairsSorted(mapNote) do
if not self.nSelectNote then
self.nSelectNote = k
end
local nNoteId = tonumber(k)
local nNoteCount = tonumber(v)
local noteCfg = ConfigTable.GetData("SubNoteSkill", nNoteId)
local itemObj = instantiate(self._mapNode.NoteSkillBtnItem, self._mapNode.goNoteContent)
itemObj:SetActive(true)
local itemCtrl = self:BindCtrlByNode(itemObj, "Game.UI.NoteSkill.NoteListBtnCtrl")
itemCtrl:SetItem(noteCfg, nNoteCount)
end
EventManager.Hit("SelectNoteListBtn", self.nSelectNote, mapNote[self.nSelectNote])
end
function NoteSkillInfoCtrl:PlayInAni()
self._mapNode.window:SetActive(true)
self._mapNode.aniWindow:Play("t_window_04_t_in")
EventManager.Hit(EventId.TemporaryBlockInput, 0.3)
end
function NoteSkillInfoCtrl:PlayOutAni()
self._mapNode.aniWindow:Play("t_window_04_t_out")
self._mapNode.aniBlur:SetTrigger("tOut")
self:AddTimer(1, 0.2, "Close", true, true, true)
EventManager.Hit(EventId.TemporaryBlockInput, 0.2)
end
function NoteSkillInfoCtrl:Close()
self._mapNode.window:SetActive(false)
EventManager.Hit(EventId.ClosePanel, PanelId.NoteSkillInfo)
end
function NoteSkillInfoCtrl:Awake()
self._mapNode.window:SetActive(false)
self.nMaxLevel = ConfigTable.GetConfigNumber("DiscSubNoteSkillMaxLevel")
local tbParam = self:GetPanelParam()
if type(tbParam) == "table" then
self.tbNote = tbParam[1]
self.nSelectNote = tbParam[2]
end
self._mapNode.btnShortcutClose.gameObject:SetActive(GamepadUIManager.GetInputState())
if GamepadUIManager.GetInputState() then
local tbConfig = {
{
sAction = "Back",
sLang = "ActionBar_Back"
}
}
self._mapNode.ActionBar:InitActionBar(tbConfig)
end
end
function NoteSkillInfoCtrl:OnEnable()
if GamepadUIManager.GetInputState() then
GamepadUIManager.EnableGamepadUI("NoteSkillInfoCtrl", self:GetGamepadUINode(), nil, true)
end
self:Open()
end
function NoteSkillInfoCtrl:OnDisable()
if GamepadUIManager.GetInputState() then
GamepadUIManager.DisableGamepadUI("NoteSkillInfoCtrl")
end
end
function NoteSkillInfoCtrl:OnBtnClick_Close()
self:PlayOutAni()
end
function NoteSkillInfoCtrl:OnEvent_SelectNoteListBtn(nNoteId, nLv)
self.nLv = nLv
self.noteCfg = ConfigTable.GetData("SubNoteSkill", nNoteId)
if nil == self.noteCfg then
return
end
NovaAPI.SetTMPText(self._mapNode.txtSkillTitle, self.noteCfg.Name)
NovaAPI.SetTMPText(self._mapNode.txtSkillLevel, "Lv" .. nLv)
NovaAPI.SetTMPText(self._mapNode.txtSkillDesc, self.noteCfg.BriefDesc)
self:SetPngSprite(self._mapNode.imgSkillIcon, self.noteCfg.Icon)
if nLv <= 0 then
NovaAPI.SetTMPText(self._mapNode.txtSkillLevel, sNotHaveColor .. ConfigTable.GetUIText("StarTower_Depot_Potential_Lock"))
end
self._mapNode.sv:Init(self.nMaxLevel, self, self.RefreshSkillGrid)
self._mapNode.sv:SetScrollGridPos(self.nLv - 1, 0.1)
end
function NoteSkillInfoCtrl:RefreshSkillGrid(goGrid, gridIndex)
local nIndex = gridIndex + 1
local txtLevel = goGrid.transform:Find("AnimRoot/layout/txtLevel"):GetComponent("TMP_Text")
local txtLevelDesc = goGrid.transform:Find("AnimRoot/layout/txtLevelDesc"):GetComponent("TMP_Text")
local imgSelect = goGrid.transform:Find("AnimRoot/imgSelect").gameObject
local sDesc = UTILS.ParseDesc(self.noteCfg, nil, nil, false, nIndex)
imgSelect:SetActive(nIndex == self.nLv)
if nIndex <= self.nLv then
NovaAPI.SetTMPText(txtLevel, "Lv." .. nIndex)
NovaAPI.SetTMPText(txtLevelDesc, sDesc)
else
sDesc = sDesc:gsub("<color[^>]+>", ""):gsub("</color>", "")
NovaAPI.SetTMPText(txtLevel, sNotHaveColor .. "Lv." .. nIndex .. "</color>")
NovaAPI.SetTMPText(txtLevelDesc, sNotHaveColor .. sDesc .. "</color>")
end
end
return NoteSkillInfoCtrl
@@ -0,0 +1,18 @@
local NoteSkillInfoPanel = class("NoteSkillInfoPanel", BasePanel)
NoteSkillInfoPanel._bIsMainPanel = false
NoteSkillInfoPanel._sSortingLayerName = AllEnum.SortingLayerName.UI_Top
NoteSkillInfoPanel._tbDefine = {
{
sPrefabPath = "NoteSkill/NoteSkillInfoPanel.prefab",
sCtrlName = "Game.UI.NoteSkill.NoteSkillInfoCtrl"
}
}
function NoteSkillInfoPanel:Awake()
end
function NoteSkillInfoPanel:OnEnable()
end
function NoteSkillInfoPanel:OnDisable()
end
function NoteSkillInfoPanel:OnDestroy()
end
return NoteSkillInfoPanel
+18
View File
@@ -0,0 +1,18 @@
local NoteSkillPanel = class("NoteSkillPanel", BasePanel)
NoteSkillPanel._bIsMainPanel = false
NoteSkillPanel._sSortingLayerName = AllEnum.SortingLayerName.UI_Top
NoteSkillPanel._tbDefine = {
{
sPrefabPath = "NoteSkill/NoteSkillPanel.prefab",
sCtrlName = "Game.UI.NoteSkill.NoteSkillCtrl"
}
}
function NoteSkillPanel:Awake()
end
function NoteSkillPanel:OnEnable()
end
function NoteSkillPanel:OnDisable()
end
function NoteSkillPanel:OnDestroy()
end
return NoteSkillPanel
@@ -0,0 +1,208 @@
local NoteSkillPreviewCtrl = class("NoteSkillPreviewCtrl", BaseCtrl)
NoteSkillPreviewCtrl._mapNodeConfig = {
aniBlur = {sComponentName = "Animator"},
aniBlur2 = {sComponentName = "Animator"},
btnBlur = {
sNodeName = "snapshot",
sComponentName = "Button",
callback = "OnBtnClick_Close"
},
btnBlur2 = {
sNodeName = "snapshot2",
sComponentName = "Button",
callback = "OnBtnClick_Close"
},
window = {},
aniWindow = {sNodeName = "window", sComponentName = "Animator"},
txtWindowTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Note_GrowthPreviewTitle"
},
btnClose = {
sComponentName = "UIButton",
callback = "OnBtnClick_Close"
},
btnNote = {
nCount = 3,
sComponentName = "UIButton",
callback = "OnBtnClick_Note"
},
imgNoteCount = {nCount = 3, sComponentName = "Image"},
imgNoteIcon = {nCount = 3, sComponentName = "Image"},
txtNoteName = {nCount = 3, sComponentName = "TMP_Text"},
txtNoteLv = {nCount = 3, sComponentName = "TMP_Text"},
txtNoteDesc = {nCount = 3, sComponentName = "TMP_Text"},
ScrollView = {
sComponentName = "LoopScrollView"
},
Content = {sComponentName = "Transform"},
txtNeedLv = {sComponentName = "TMP_Text"}
}
NoteSkillPreviewCtrl._mapEventConfig = {}
function NoteSkillPreviewCtrl:Open()
self._mapNode.aniBlur.gameObject:SetActive(self.bBlur)
self._mapNode.aniBlur2.gameObject:SetActive(not self.bBlur)
self:InitData()
self:PlayInAni()
self:Refresh()
end
function NoteSkillPreviewCtrl:InitData()
local nGroupId = ConfigTable.GetData("SubNoteSkillPromoteGroup", self.nSubNoteSkillId).GroupId
local tbGroup = CacheTable.GetData("_SubNoteSkillPromoteGroup", nGroupId)
if not tbGroup then
return
end
self.tbGroup = {}
for _, v in pairs(tbGroup) do
table.insert(self.tbGroup, v)
end
table.sort(self.tbGroup, function(a, b)
return a.Phase < b.Phase
end)
for k, v in ipairs(self.tbGroup) do
if v.Id == self.nSubNoteSkillId then
self.nSelect = k
self.nCurPhase = v.Phase
end
end
self.tbLevel = {}
self.tbLevel[0] = 1
local foreachDiscPromoteLimit = function(mapData)
if mapData.Rarity == self.nRarity then
self.tbLevel[tonumber(mapData.Phase) + 1] = tonumber(mapData.MaxLevel)
end
end
ForEachTableLine(DataTable.DiscPromoteLimit, foreachDiscPromoteLimit)
end
function NoteSkillPreviewCtrl:Refresh()
self:RefreshNote(self.nSelect, self.nPhase)
for nInstanceId, objCtrl in pairs(self.tbGridCtrl) do
self:UnbindCtrlByNode(objCtrl)
self.tbGridCtrl[nInstanceId] = nil
end
local nMaxLevel = #self.tbGroup
if nMaxLevel < 0 then
return
end
self._mapNode.ScrollView:Init(nMaxLevel, self, self.OnGridRefresh, self.OnGridBtnClick)
local movePos = 0 < self.nSelect - 2 and self.nSelect - 2 or 0
self._mapNode.ScrollView:SetScrollGridPos(movePos, 0.05)
end
function NoteSkillPreviewCtrl:RefreshNote(nIndex, nPhase)
local mapData = self.tbGroup[nIndex]
local tbSubNoteSkills = {}
local tbNote = decodeJson(mapData.SubNoteSkills)
for k, v in pairs(tbNote) do
local nNoteId = tonumber(k)
local nNoteCount = tonumber(v)
if nNoteId then
table.insert(tbSubNoteSkills, {nId = nNoteId, nCount = nNoteCount})
end
end
self.tbSubNoteSkills = tbSubNoteSkills
for i = 1, 3 do
self._mapNode.btnNote[i].gameObject:SetActive(tbSubNoteSkills[i])
if tbSubNoteSkills[i] then
local nImgCount = 2
self:SetPngSprite(self._mapNode.imgNoteCount[i], "UI/big_sprites/zs_outfit_lv_" .. nImgCount)
NovaAPI.SetImageNativeSize(self._mapNode.imgNoteCount[i])
local mapNote = ConfigTable.GetData("SubNoteSkill", tbSubNoteSkills[i].nId)
if mapNote then
self:SetPngSprite(self._mapNode.imgNoteIcon[i], mapNote.Icon)
NovaAPI.SetTMPText(self._mapNode.txtNoteName[i], mapNote.Name)
NovaAPI.SetTMPText(self._mapNode.txtNoteDesc[i], mapNote.BriefDesc)
NovaAPI.SetTMPText(self._mapNode.txtNoteLv[i], orderedFormat(ConfigTable.GetUIText("StarTower_Disc_Info_Level"), tbSubNoteSkills[i].nCount))
end
end
end
NovaAPI.SetTMPText(self._mapNode.txtNeedLv, orderedFormat(ConfigTable.GetUIText("Advance_Need_Level"), self.tbLevel[nPhase]))
end
function NoteSkillPreviewCtrl:OnGridRefresh(goGrid, gridIndex)
local nIndex = gridIndex + 1
local mapData = self.tbGroup[nIndex]
local nInstanceID = goGrid:GetInstanceID()
if not self.tbGridCtrl[nInstanceID] then
self.tbGridCtrl[nInstanceID] = self:BindCtrlByNode(goGrid, "Game.UI.NoteSkill.NotePreviewNodeCtrl")
end
self.tbGridCtrl[nInstanceID]:RefreshNode(mapData.Phase, self.nCurPhase, nIndex == self.nSelect)
end
function NoteSkillPreviewCtrl:OnGridBtnClick(goGrid, gridIndex)
local nIndex = gridIndex + 1
if nIndex == self.nSelect then
return
end
local nInstanceID = goGrid:GetInstanceID()
local rtItemBefore = self._mapNode.Content:Find(tostring(self.nSelect - 1))
if rtItemBefore ~= nil then
local nId = rtItemBefore.gameObject:GetInstanceID()
if self.tbGridCtrl[nId] ~= nil then
self.tbGridCtrl[nId]:SetSelect(false)
end
end
if self.tbGridCtrl[nInstanceID] ~= nil then
self.tbGridCtrl[nInstanceID]:SetSelect(true)
end
self.nSelect = nIndex
self:RefreshNote(self.nSelect, self.tbGroup[nIndex].Phase)
end
function NoteSkillPreviewCtrl:PlayInAni()
self._mapNode.window:SetActive(true)
self._mapNode.aniWindow:Play("t_window_04_t_in")
EventManager.Hit(EventId.TemporaryBlockInput, 0.3)
end
function NoteSkillPreviewCtrl:PlayOutAni()
if self.bBlur then
self._mapNode.aniWindow:Play("t_window_04_t_out")
self._mapNode.aniBlur:SetTrigger("tOut")
self:AddTimer(1, 0.2, "Close", true, true, true)
EventManager.Hit(EventId.TemporaryBlockInput, 0.2)
else
self._mapNode.aniBlur2.gameObject:SetActive(false)
self:Close()
end
end
function NoteSkillPreviewCtrl:Close()
self._mapNode.window:SetActive(false)
EventManager.Hit(EventId.ClosePanel, PanelId.NoteSkillPreview)
end
function NoteSkillPreviewCtrl:Awake()
self._mapNode.window:SetActive(false)
self.bBlur = true
local tbParam = self:GetPanelParam()
if type(tbParam) == "table" then
self.nSubNoteSkillId = tbParam[1]
self.nPhase = tbParam[2]
self.nRarity = tbParam[3]
if tbParam[4] ~= nil then
self.bBlur = tbParam[4]
end
end
end
function NoteSkillPreviewCtrl:OnEnable()
self.tbGridCtrl = {}
self:Open()
end
function NoteSkillPreviewCtrl:OnDisable()
for nInstanceId, objCtrl in pairs(self.tbGridCtrl) do
self:UnbindCtrlByNode(objCtrl)
self.tbGridCtrl[nInstanceId] = nil
end
self.tbGridCtrl = {}
end
function NoteSkillPreviewCtrl:OnDestroy()
end
function NoteSkillPreviewCtrl:OnBtnClick_Close()
self:PlayOutAni()
end
function NoteSkillPreviewCtrl:OnBtnClick_Note(btn, nIndex)
local mapNote = self.tbSubNoteSkills[nIndex]
if not mapNote then
return
end
local tbNote = {}
for _, v in ipairs(self.tbSubNoteSkills) do
tbNote[v.nId] = v.nCount
end
EventManager.Hit(EventId.OpenPanel, PanelId.NoteSkill, tbNote, mapNote.nId, false)
end
return NoteSkillPreviewCtrl
@@ -0,0 +1,18 @@
local NoteSkillPreviewPanel = class("NoteSkillPreviewPanel", BasePanel)
NoteSkillPreviewPanel._bIsMainPanel = false
NoteSkillPreviewPanel._sSortingLayerName = AllEnum.SortingLayerName.UI_Top
NoteSkillPreviewPanel._tbDefine = {
{
sPrefabPath = "NoteSkill/NoteSkillPreviewPanel.prefab",
sCtrlName = "Game.UI.NoteSkill.NoteSkillPreviewCtrl"
}
}
function NoteSkillPreviewPanel:Awake()
end
function NoteSkillPreviewPanel:OnEnable()
end
function NoteSkillPreviewPanel:OnDisable()
end
function NoteSkillPreviewPanel:OnDestroy()
end
return NoteSkillPreviewPanel