Ignore:
Timestamp:
Sep 14, 2024, 5:43:37 PM (5 days ago)
Author:
chronos
Message:
  • Added: Nwe editor menu action to create filled map with selected tile.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Term.pas

    r613 r614  
    1212{$ENDIF}
    1313  Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase,
    14   LCLIntf, LCLType, SysUtils, Classes, DrawDlg, Types, Math,
     14  LCLIntf, LCLType, Menus, SysUtils, Classes, DrawDlg, Types, Math,
    1515  DateUtils, Platform, ButtonB, ButtonC, EOTButton, Area,
    1616  GraphicSet, MiniMap, IsoEngine, Wonders, TechTree, Enhance, Nego, CityType,
     
    3434  TMainScreen = class(TDrawDlg)
    3535    mBigTiles: TMenuItem;
     36    mFillMap: TMenuItem;
    3637    mNextUnit: TMenuItem;
    3738    N13: TMenuItem;
     
    197198    procedure mDiagramClick(Sender: TObject);
    198199    procedure mEmpireClick(Sender: TObject);
     200    procedure mFillMapClick(Sender: TObject);
    199201    procedure mEnhanceClick(Sender: TObject);
    200202    procedure mEnhanceDefClick(Sender: TObject);
     
    37613763end;
    37623764
     3765procedure TMainScreen.mFillMapClick(Sender: TObject);
     3766var
     3767  FillMapData: TFillMapData;
     3768begin
     3769  if not Edited or (SimpleQuery(mkYesNo, Phrases.Lookup('MAP_FILL'), '')
     3770      = mrOK) then begin
     3771    FillMapData.Tile := BrushType;
     3772    Server(sFillMap, Me, 0, FillMapData);
     3773    Edited := True;
     3774    MapValid := False;
     3775    PaintAllMaps;
     3776  end;
     3777end;
     3778
    37633779procedure TMainScreen.mEnhanceClick(Sender: TObject);
    37643780begin
     
    52205236                      end;
    52215237                    end;
    5222                     Inc(Count)
     5238                    Inc(Count);
    52235239                  end;
    52245240                end; // for uix:=0 to MyRO.nUn-1
     
    52705286              JobFocus := nJob + 3
    52715287            else
    5272               JobFocus := nJob + 4
     5288              JobFocus := nJob + 4;
    52735289          end;
    52745290          S := Phrases.Lookup('JOBRESULT', JobFocus);
     
    52945310            (PanelHeight - 1), Left + Width, Top + Height - Self.ClientHeight +
    52955311            PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight)
    5296     end; { if TroopLoc>=0 }
     5312    end; { if TroopLoc >= 0 }
    52975313  end;
    52985314
     
    53325348  xTreasurySection := ClientWidth div 2 - 172;
    53335349  xResearchSection := ClientWidth div 2;
    5334   // ClientWidth div 2+68 = maximum to right
     5350  // ClientWidth div 2 + 68 = maximum to right
    53355351  FillLarge(TopBar.Canvas, 0, 0, ClientWidth, TopBarHeight - 3,
    53365352    ClientWidth div 2);
     
    54225438      if ScienceSum > 0 then
    54235439      begin
    5424         { j:=(i-MyRO.Research-1) div ScienceSum +1;
    5425           if J<1 then J:=1;
    5426           if J>1 then
    5427           S:=Format(Phrases.Lookup('TECHWAIT'),[S,J]); }
     5440        { j := (i - MyRO.Research - 1) div ScienceSum + 1;
     5441          if J < 1 then J := 1;
     5442          if J > 1 then
     5443          S := Format(Phrases.Lookup('TECHWAIT'), [S, J]); }
    54285444        LoweredTextOut(TopBar.Canvas, -1, MainTexture,
    54295445          xResearchSection + 48, 0, S);
     
    70037019  mResign.ShortCut := BResign.ShortCut;
    70047020  mRandomMap.ShortCut := BRandomMap.ShortCut;
     7021  mFillMap.ShortCut := BFillMap.ShortCut;
    70057022  mDisband.ShortCut := BDisbandUnit.ShortCut;
    70067023  mFort.ShortCut := BFortify.ShortCut;
     
    71227139    if BResign.Test(ShortCut) then mResign.Click
    71237140    else if BRandomMap.Test(ShortCut) then mRandomMap.Click
     7141    else if BFillMap.Test(ShortCut) then mFillMap.Click
    71247142    else if BHelp.Test(ShortCut) then mHelp.Click;
    71257143    (*if Shift = [ssCtrl] then
     
    74747492    mRandomMap.Visible := (ClientMode = cEditMap) and
    74757493      (Server(sMapGeneratorRequest, Me, 0, nil^) = eOK);
     7494    mFillMap.Visible := mRandomMap.Visible;
    74767495    mOptions.Visible := ClientMode <> cEditMap;
    74777496    mManip.Visible := ClientMode <> cEditMap;
Note: See TracChangeset for help on using the changeset viewer.