Changeset 614 for trunk/LocalPlayer


Ignore:
Timestamp:
Sep 14, 2024, 5:43:37 PM (2 months ago)
Author:
chronos
Message:
  • Added: Nwe editor menu action to create filled map with selected tile.
Location:
trunk/LocalPlayer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/KeyBindings.pas

    r468 r614  
    5757  BResign: TKeyBinding;
    5858  BRandomMap: TKeyBinding;
     59  BFillMap: TKeyBinding;
    5960  BDisbandUnit: TKeyBinding;
    6061  BFortify: TKeyBinding;
     
    321322  BResign := AddItem('Resign', 'Resign', 'Ctrl+Q');
    322323  BRandomMap := AddItem('RandomMap', 'Random map', 'Ctrl+R');
     324  BFillMap := AddItem('FillMap', 'Fill map', 'Ctrl+F');
    323325  BDisbandUnit := AddItem('DisbandUnit', 'Disband unit', 'Ctrl+D');
    324326  BFortify := AddItem('Fortify', 'Fortify', 'F');
  • trunk/LocalPlayer/Term.lfm

    r533 r614  
    1414  DesignTimePPI = 144
    1515  Font.Color = clWindowText
    16   Font.Height = -20
     16  Font.Height = -45
    1717  Font.Name = 'MS Sans Serif'
    1818  KeyPreview = True
     
    3131  OnShow = FormShow
    3232  Position = poDefault
    33   LCLVersion = '2.2.0.4'
     33  LCLVersion = '3.4.0.0'
    3434  Scaled = False
    35   WindowState = wsNormal
    3635  object UnitBtn: TButtonB
    3736    Tag = 14
     
    555554      OnClick = mRandomMapClick
    556555    end
     556    object mFillMap: TMenuItem
     557      Tag = 102
     558      GroupIndex = 1
     559      ShortCut = 16454
     560      OnClick = mFillMapClick
     561    end
    557562    object N3: TMenuItem
    558563      Caption = '-'
  • 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.