Changeset 274 for trunk/Forms


Ignore:
Timestamp:
Feb 3, 2019, 8:32:20 PM (6 years ago)
Author:
chronos
Message:
  • Added: Keep information about available unit moves during turn.
  • Added: Allow to move units instantly during turn.
  • Added: Game system parameter to play without possibility to merge/split units.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormClient.pas

    r273 r274  
    155155    FormMove.TrackBarRepeat.Max := FormMove.SpinEditRepeat.MaxValue;
    156156    FormMove.TrackBarRepeat.Position := FormMove.SpinEditRepeat.Value;
     157
     158    FormMove.AllowChangeOnce := Client.Game.GameSystem.UnitsSplitMerge;
     159
    157160    if Assigned(CellTo.MapCell.OneUnit) then
    158161      FormMove.DefendCount := CellTo.MapCell.OneUnit.Power
  • trunk/Forms/UFormMove.pas

    r272 r274  
    4848    AttackCount: Integer;
    4949    ShowWinProbability: Boolean;
     50    AllowChangeOnce: Boolean;
    5051    procedure UpdateView;
    5152  end;
     
    102103    SpinEditRepeat.SetFocus;
    103104  end else begin
    104     SpinEditOnce.Enabled := True;
    105     TrackBarOnce.Enabled := True;
    106     SpinEditOnce.SetFocus;
     105    SpinEditOnce.Enabled := AllowChangeOnce;
     106    TrackBarOnce.Enabled := AllowChangeOnce;
     107    ButtonOnceMax.Enabled := AllowChangeOnce;
     108    ButtonOnceMin.Enabled := AllowChangeOnce;
     109    if SpinEditOnce.Enabled then SpinEditOnce.SetFocus
     110    else if SpinEditRepeat.Enabled then SpinEditRepeat.SetFocus
     111    else ButtonOk.SetFocus;
    107112  end;
    108113  UpdateView;
  • trunk/Forms/UFormNew.lfm

    r273 r274  
    3333      object Panel3: TPanel
    3434        Left = 0
    35         Height = 655
     35        Height = 652
    3636        Top = 0
    37         Width = 739
     37        Width = 796
    3838        Align = alClient
    3939        BevelOuter = bvNone
    40         ClientHeight = 655
    41         ClientWidth = 739
     40        ClientHeight = 652
     41        ClientWidth = 796
    4242        TabOrder = 0
    4343        object RadioButtonModeLocal: TRadioButton
     
    103103        object ListViewServers: TListView
    104104          Left = 26
    105           Height = 423
     105          Height = 420
    106106          Top = 181
    107107          Width = 334
     
    131131          Left = 27
    132132          Height = 31
    133           Top = 616
     133          Top = 613
    134134          Width = 94
    135135          Action = AServerAdd
     
    140140          Left = 240
    141141          Height = 31
    142           Top = 616
     142          Top = 613
    143143          Width = 94
    144144          Action = AServerRemove
     
    149149          Left = 136
    150150          Height = 30
    151           Top = 616
     151          Top = 613
    152152          Width = 94
    153153          Action = AServerModify
     
    326326        object ComboBoxGridType: TComboBox
    327327          Left = 146
    328           Height = 42
     328          Height = 38
    329329          Top = 104
    330330          Width = 208
     
    343343        object ComboBoxMapShape: TComboBox
    344344          Left = 146
    345           Height = 42
     345          Height = 38
    346346          Top = 144
    347347          Width = 208
     
    587587        object ComboBoxWinObjective: TComboBox
    588588          Left = 224
    589           Height = 42
     589          Height = 38
    590590          Top = 244
    591591          Width = 328
     
    702702          TabOrder = 5
    703703        end
     704        object CheckBoxUnitsSplitMerge: TCheckBox
     705          Left = 336
     706          Height = 30
     707          Top = 101
     708          Width = 231
     709          Caption = 'Units can split or merge'
     710          TabOrder = 6
     711        end
     712        object CheckBoxUnitsMoveImmediately: TCheckBox
     713          Left = 336
     714          Height = 30
     715          Top = 141
     716          Width = 234
     717          Caption = 'Units move immediately'
     718          TabOrder = 7
     719        end
    704720      end
    705721    end
  • trunk/Forms/UFormNew.pas

    r273 r274  
    3232    ButtonPlayerModify: TButton;
    3333    ButtonPlayerRemove: TButton;
     34    CheckBoxUnitsSplitMerge: TCheckBox;
    3435    CheckBoxEmptyCellsNeutral: TCheckBox;
    3536    CheckBoxBridges: TCheckBox;
     
    3839    CheckBoxFogOfWar: TCheckBox;
    3940    CheckBoxSymetricMap: TCheckBox;
     41    CheckBoxUnitsMoveImmediately: TCheckBox;
    4042    CheckBoxVoid: TCheckBox;
    4143    ComboBoxGridType: TComboBox;
     
    360362    SpinEditSpecialCells.Value := SpecialCaptureCellCount;
    361363    CheckBoxEmptyCellsNeutral.Checked := GameSystem.EmptyCellsNeutral;
     364    CheckBoxUnitsSplitMerge.Checked := GameSystem.UnitsSplitMerge;
     365    CheckBoxUnitsMoveImmediately.Checked := GameSystem.UnitsMoveImmediately;
    362366  end;
    363367end;
     
    389393    SpecialCaptureCellCount := SpinEditSpecialCells.Value;
    390394    GameSystem.EmptyCellsNeutral := CheckBoxEmptyCellsNeutral.Checked;
     395    GameSystem.UnitsSplitMerge := CheckBoxUnitsSplitMerge.Checked;
     396    GameSystem.UnitsMoveImmediately := CheckBoxUnitsMoveImmediately.Checked;
    391397  end;
    392398end;
Note: See TracChangeset for help on using the changeset viewer.