40 lines
890 B
Lua
40 lines
890 B
Lua
---@class WB_ShowTrackInfo_C:UUserWidget
|
|
---@field Overlay_Main UOverlay
|
|
---@field TextBlock_Dis UTextBlock
|
|
--Edit Below--
|
|
---@type WB_ShowTrackInfo_C
|
|
local WB_ShowTrackInfo = {
|
|
bInitDoOnce = false;
|
|
IsVis = false
|
|
};
|
|
|
|
--[==[ Construct
|
|
function WB_ShowTrackInfo:Construct()
|
|
|
|
end
|
|
-- Construct ]==]
|
|
|
|
-- function WB_ShowTrackInfo:Tick(MyGeometry, InDeltaTime)
|
|
|
|
-- end
|
|
|
|
-- function WB_ShowTrackInfo:Destruct()
|
|
|
|
-- end
|
|
|
|
function WB_ShowTrackInfo:UpdateDis(NewDis)
|
|
self.TextBlock_Dis:SetText(string.format("%.1fm", NewDis / 100.))
|
|
end
|
|
|
|
function WB_ShowTrackInfo:SetVis(InIsVis)
|
|
if InIsVis ~= self.IsVis then
|
|
self.IsVis = InIsVis
|
|
if self.IsVis then
|
|
self.Overlay_Main:SetVisibility(ESlateVisibility.SelfHitTestInvisible)
|
|
else
|
|
self.Overlay_Main:SetVisibility(ESlateVisibility.Collapsed)
|
|
end
|
|
end
|
|
end
|
|
|
|
return WB_ShowTrackInfo; |