Files
StellaSora_DataLua/lua/game/ui/depotex/depotinfodescribectrl.lua
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

26 lines
1.0 KiB
Lua

local DepotInfoDescribeCtrl = class("DepotInfoDescribeCtrl", BaseCtrl)
DepotInfoDescribeCtrl._mapNodeConfig = {
txtTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Depot_Info_Describe"
},
txtDesc = {sComponentName = "TMP_Text"}
}
DepotInfoDescribeCtrl._mapEventConfig = {}
function DepotInfoDescribeCtrl:SetDesc(nId)
if ConfigTable.GetData_Item(nId).Desc and ConfigTable.GetData_Item(nId).Desc ~= "" then
if ConfigTable.GetData_Item(nId).Literary and ConfigTable.GetData_Item(nId).Literary ~= "" then
NovaAPI.SetTMPText(self._mapNode.txtDesc, ConfigTable.GetData_Item(nId).Desc .. [[
<color=#5E89B4>]] .. ConfigTable.GetData_Item(nId).Literary .. "</color>")
else
NovaAPI.SetTMPText(self._mapNode.txtDesc, ConfigTable.GetData_Item(nId).Desc)
end
elseif ConfigTable.GetData_Item(nId).Literary and ConfigTable.GetData_Item(nId).Literary ~= "" then
NovaAPI.SetTMPText(self._mapNode.txtDesc, ConfigTable.GetData_Item(nId).Literary)
else
NovaAPI.SetTMPText(self._mapNode.txtDesc, "")
end
end
return DepotInfoDescribeCtrl