---@class WB_ImportPlaceCode_C:UUserWidget ---@field Button_ClosePanel UNewButton ---@field Button_Import UNewButton ---@field EditableText_ShowPlaceCode UWidget_NewEditableText_C --Edit Below-- local WB_ImportPlaceCode = { bInitDoOnce = false; }; function WB_ImportPlaceCode:Construct() WidgetLibrary.BindButtonClicked(self.Button_ClosePanel, self.CloseSelf, self) WidgetLibrary.BindButtonClicked(self.Button_Import, self.ImportCode, self) -- UGCEventSystem.AddListener(EventEnum.ImportPlacementCallBack, self.ImportPlacementCallBack, self) end function WB_ImportPlaceCode:OnShowPanel() --local PlaceCode = PlacementModeConfig.GetPlaceManager():ExportPlacementCode() --self.EditableText_ShowPlaceCode:SetText(PlaceCode) self.EditableText_ShowPlaceCode:SetText("") end function WB_ImportPlaceCode:CloseSelf() WidgetManager:ClosePanel(WidgetConfig.EUIType.ImportPlaceCode) end function WB_ImportPlaceCode:ImportPlacementCallBack(InPlaceDecodeCallbackType) UGCEventSystem.SendEvent(EventEnum.AddTip, TipConfig.TipType.ImportCodeCallBack, InPlaceDecodeCallbackType) if InPlaceDecodeCallbackType == PlacementModeConfig.EPlaceDecodeCallback.Succeed then WidgetManager:ClosePanel(WidgetConfig.EUIType.ImportPlaceCode) end end WB_ImportPlaceCode.LastImportCode = 0; function WB_ImportPlaceCode:ImportCode() local NowTime = UGCSystemLibrary.GetGameTime() if NowTime - self.LastImportCode > 2 then self.LastImportCode = NowTime UGCSendRPCSystem.ActorRPCNotify(nil, PlacementModeConfig.GetPlaceManager(), "PreImportPlacementCode", UGCSystemLibrary.GetLocalPlayerKey(), self.EditableText_ShowPlaceCode:GetText()) WidgetManager:ClosePanel(WidgetConfig.EUIType.ImportPlaceCode) end end -- function WB_ImportPlaceCode:Tick(MyGeometry, InDeltaTime) -- end -- function WB_ImportPlaceCode:Destruct() -- end return WB_ImportPlaceCode;