PGRData/Script/matrix/xui/xuidlchunt/rank/XUiDlcHuntTeamRankMember.lua

24 lines
730 B
Lua
Raw Normal View History

2024-09-01 22:49:41 +02:00
---@class XUiDlcHuntTeamRankMember
local XUiDlcHuntTeamRankMember = XClass(nil, "XUiDlcHuntTeamRankMember")
function XUiDlcHuntTeamRankMember:Ctor(ui)
self.GameObject = ui.gameObject
self.Transform = ui.transform
XTool.InitUiObject(self)
self._Data = false
XUiHelper.RegisterClickEvent(self, self.BtnHead, function()
if not self._Data then
return
end
XDataCenter.DlcHuntManager.OpenPlayerDetail(self._Data.PlayerId)
end)
end
function XUiDlcHuntTeamRankMember:Update(data)
self._Data = data
self.StandIcon:SetRawImage(data.Icon)
self.TxtNickname.text = data.Name
self.ImgCaptain.gameObject:SetActiveEx(data.IsLeader)
end
return XUiDlcHuntTeamRankMember