UGCProjects/ProjectTemp_T/Script/UI/WB_SelectTeam.lua

55 lines
1.4 KiB
Lua
Raw Normal View History

2025-01-04 23:00:19 +08:00
---@class WB_SelectTeam_C:UUserWidget
---@field Button_Left UButton
---@field Button_Right UButton
---@field ScrollBox_Left UScrollBox
---@field ScrollBox_Right UScrollBox
--Edit Below--
---@type WB_SelectTeam_C
local WB_SelectTeam = { bInitDoOnce = false; };
function WB_SelectTeam:Construct()
WB_SelectTeam.SuperClass.Construct(self)
EventSystem:AddListener(EventType.UpdateTeamInfo, self.OnUpdateTeamInfo, self);
-- 绑定点击的按钮操作
UITool.BindButtonClicked(self.Button_Left, self.ClickLeft, self)
UITool.BindButtonClicked(self.Button_Right, self.ClickRight, self)
end
-- function WB_SelectTeam:Tick(MyGeometry, InDeltaTime)
-- end
function WB_SelectTeam:Destruct()
EventSystem:RemoveListener(EventType.UpdateTeamInfo, self.OnUpdateTeamInfo, self)
WB_SelectTeam.SuperClass.Destruct(self)
end
function WB_SelectTeam:ClickLeft()
-- 选择左半边
end
function WB_SelectTeam:ClickRight()
-- 选择右半边
end
---@param InTeamInfo table<table<int32>> 队伍玩家 PlayerKey
function WB_SelectTeam:OnUpdateTeamInfo(InTeamInfo)
for TeamId, Table in pairs(InTeamInfo) do
for i, PlayerKey in pairs(Table) do
end
end
end
function WB_SelectTeam:SetSelect(InTeamType)
--local PC = LocalPlayerController;
--UnrealNetwork.CallUnrealRPC(PC, PC, "ServerRPC_SetSelectTeam", PC.PlayerKey, InTeamType);
end
function WB_SelectTeam:OnCloseSelectTeam()
UIManager:ClosePanel(UIConfig.EUIType.SelectTeam);
end
return WB_SelectTeam;