diff --git a/Client/UfrmMain.pas b/Client/UfrmMain.pas index ca2f913..c6afe76 100644 --- a/Client/UfrmMain.pas +++ b/Client/UfrmMain.pas @@ -371,6 +371,7 @@ type { Methods } procedure BuildTileList; function ConfirmAction: Boolean; + procedure EnableActions(AEnabled: Boolean); function FindRandomPreset(AName: String): TDOMElement; procedure ForceUpdateCurrentTile; procedure GetDrawOffset(AX, AY: Integer; out DrawX, DrawY: Integer); inline; @@ -2008,6 +2009,8 @@ var begin // Make sure to reset the current view first. PreviewUoaDesign(nil); + acSelect.Checked := True; + EnableActions(False); UnregisterSelectionListener(@PlaceUoaDesign); UnregisterHoverListener(@PreviewUoaDesign); @@ -2338,6 +2341,7 @@ begin FCurrentUoaDesignAnchor := nil; vstUoaDesigns.Enabled := True; btnCancelUOAPlacement.Visible := False; + EnableActions(True); selectedNode := vstUoaDesigns.GetFirstSelected(); if selectedNode = nil then @@ -3629,6 +3633,15 @@ begin oglGameWindowMouseLeave(nil); end; +procedure TfrmMain.EnableActions(AEnabled: Boolean); +begin + acSelect.Enabled := AEnabled; + acMove.Enabled := AEnabled; + acElevate.Enabled := AEnabled; + acDelete.Enabled := AEnabled; + acHue.Enabled := AEnabled; +end; + function TfrmMain.FindRandomPreset(AName: String): TDOMElement; var preset: TDOMElement;