Changeset 198 for trunk/Forms


Ignore:
Timestamp:
May 16, 2018, 1:38:11 PM (7 years ago)
Author:
chronos
Message:
  • Added: Capture all special cells objective is now functional. Number of such cells can be specified. They are randomly spread across map and such cells are marked with "!" symbol after its number of units.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.lfm

    r197 r198  
    505505          'Stay alive for number of turns'
    506506        )
     507        OnChange = ComboBoxWinObjectiveChange
    507508        Style = csDropDownList
    508509        TabOrder = 1
     
    540541        TabOrder = 3
    541542      end
    542       object Label13: TLabel
    543         Left = 8
    544         Height = 20
    545         Top = 280
    546         Width = 111
    547         Caption = 'Number of turns:'
    548         ParentColor = False
    549       end
    550       object SpinEditTurns: TSpinEdit
    551         Left = 236
    552         Height = 28
    553         Top = 278
    554         Width = 159
    555         MaxValue = 1000
    556         MinValue = 1
     543      object PageControl2: TPageControl
     544        Left = 12
     545        Height = 78
     546        Top = 274
     547        Width = 756
     548        ActivePage = TabSheetCaptureCities
     549        Anchors = [akTop, akLeft, akRight]
     550        ShowTabs = False
     551        TabIndex = 1
    557552        TabOrder = 4
    558         Value = 1
     553        object TabSheetDefeatEnemies: TTabSheet
     554        end
     555        object TabSheetCaptureCities: TTabSheet
     556        end
     557        object TabSheetCaptureCells: TTabSheet
     558          ClientHeight = 70
     559          ClientWidth = 748
     560          object Label14: TLabel
     561            Left = 8
     562            Height = 20
     563            Top = 16
     564            Width = 125
     565            Caption = 'Special cells count:'
     566            ParentColor = False
     567          end
     568          object SpinEditSpecialCells: TSpinEdit
     569            Left = 236
     570            Height = 28
     571            Top = 8
     572            Width = 159
     573            MaxValue = 1000
     574            MinValue = 1
     575            TabOrder = 0
     576            Value = 1
     577          end
     578        end
     579        object TabSheetStayAliveTurns: TTabSheet
     580          ClientHeight = 70
     581          ClientWidth = 748
     582          object Label13: TLabel
     583            Left = 8
     584            Height = 20
     585            Top = 16
     586            Width = 111
     587            Caption = 'Number of turns:'
     588            ParentColor = False
     589          end
     590          object SpinEditTurns: TSpinEdit
     591            Left = 236
     592            Height = 28
     593            Top = 8
     594            Width = 159
     595            MaxValue = 1000
     596            MinValue = 1
     597            TabOrder = 0
     598            Value = 1
     599          end
     600        end
    559601      end
    560602    end
  • trunk/Forms/UFormNew.pas

    r197 r198  
    4646    Label12: TLabel;
    4747    Label13: TLabel;
     48    Label14: TLabel;
    4849    Label2: TLabel;
    4950    Label3: TLabel;
     
    6465    OpenPictureDialog1: TOpenPictureDialog;
    6566    PageControl1: TPageControl;
     67    PageControl2: TPageControl;
    6668    PanelButtons: TPanel;
    6769    PanelChat: TPanel;
     
    7375    RadioGroupGrowAmount: TRadioGroup;
    7476    RadioGroupGrowCells: TRadioGroup;
    75     SpinEditTurns: TSpinEdit;
    7677    SpinEditMaxPower: TSpinEdit;
    7778    SpinEditServerPort: TSpinEdit;
     
    8081    SpinEditMapSizeY: TSpinEdit;
    8182    SpinEditNeutralUnits: TSpinEdit;
     83    SpinEditSpecialCells: TSpinEdit;
     84    SpinEditTurns: TSpinEdit;
    8285    SpinEditVoidPercent: TSpinEdit;
    8386    Splitter1: TSplitter;
     
    8588    TabSheet2: TTabSheet;
    8689    TabSheet3: TTabSheet;
     90    TabSheetStayAliveTurns: TTabSheet;
     91    TabSheetCaptureCells: TTabSheet;
     92    TabSheetDefeatEnemies: TTabSheet;
     93    TabSheetCaptureCities: TTabSheet;
    8794    TabSheetMode: TTabSheet;
    8895    TrackBarSizeX: TTrackBar;
     
    98105    procedure CheckBoxVoidChange(Sender: TObject);
    99106    procedure ComboBoxMapShapeChange(Sender: TObject);
     107    procedure ComboBoxWinObjectiveChange(Sender: TObject);
    100108    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    101109    procedure FormCreate(Sender: TObject);
     
    151159  SWinObjectiveDefeatAllOponents = 'Defeat all oponents';
    152160  SWinObjectiveDefeatAllCities = 'Defeat all oponents cities';
    153   SWinObjectiveCapturePosition = 'Capture position';
     161  SWinObjectiveCapturePosition = 'Capture all special cells';
    154162  SWinObjectiveStayAliveForTurns = 'Stay alive for number of turns';
    155163  SGrowNone = 'None';
     
    371379begin
    372380  ReloadView;
     381end;
     382
     383procedure TFormNew.ComboBoxWinObjectiveChange(Sender: TObject);
     384begin
     385  PageControl2.TabIndex := ComboBoxWinObjective.ItemIndex;
    373386end;
    374387
     
    504517    SpinEditMaxPower.Value := Game.MaxPower;
    505518    SpinEditTurns.Value := Game.StayAliveForDefinedTurns;
     519    SpinEditSpecialCells.Value := Game.SpecialCaptureCellCount;
    506520  end;
    507521end;
     
    540554    Game.MaxPower := SpinEditMaxPower.Value;
    541555    Game.StayAliveForDefinedTurns := SpinEditTurns.Value;
     556    Game.SpecialCaptureCellCount := SpinEditSpecialCells.Value;
    542557  end;
    543558end;
Note: See TracChangeset for help on using the changeset viewer.