Changeset 42 for trunk/Forms


Ignore:
Timestamp:
Mar 18, 2014, 12:16:04 AM (11 years ago)
Author:
chronos
Message:
  • Added: Min and Max buttons on unit move form for easy usual actions.
  • Added: Win objective can be selected on New game form.
  • Added: Max number of netureal starting units per cell cen be adjusted.
  • Added: Unit count is shown in move arrows.
Location:
trunk/Forms
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMove.lfm

    r40 r42  
    11object FormMove: TFormMove
    22  Left = 770
    3   Height = 240
     3  Height = 257
    44  Top = 484
    55  Width = 320
    66  ActiveControl = ButtonOk
    77  Caption = 'Move'
    8   ClientHeight = 240
     8  ClientHeight = 257
    99  ClientWidth = 320
    1010  OnShow = FormShow
     
    2727  end
    2828  object ButtonOk: TButton
    29     Left = 192
     29    Left = 184
    3030    Height = 25
    31     Top = 200
     31    Top = 208
    3232    Width = 75
    3333    Caption = 'Ok'
     
    3939    Left = 72
    4040    Height = 25
    41     Top = 200
     41    Top = 208
    4242    Width = 75
    4343    Caption = 'Cancel'
     
    6262  end
    6363  object TrackBarOnce: TTrackBar
    64     Left = 8
     64    Left = 56
    6565    Height = 43
    6666    Top = 55
    67     Width = 296
     67    Width = 208
    6868    OnChange = TrackBarOnceChange
    6969    PageSize = 1
     
    7474  end
    7575  object TrackBarRepeat: TTrackBar
    76     Left = 8
     76    Left = 56
    7777    Height = 43
    7878    Top = 152
    79     Width = 304
     79    Width = 208
    8080    OnChange = TrackBarRepeatChange
    8181    PageSize = 1
     
    8585    TabOrder = 5
    8686  end
     87  object ButtonOnceMin: TButton
     88    Left = 8
     89    Height = 25
     90    Top = 64
     91    Width = 48
     92    Caption = 'Min'
     93    OnClick = uttonOnceMinClick
     94    TabOrder = 6
     95  end
     96  object ButtonOnceMax: TButton
     97    Left = 264
     98    Height = 25
     99    Top = 64
     100    Width = 48
     101    Anchors = [akTop, akRight]
     102    Caption = 'Max'
     103    OnClick = ButtonOnceMaxClick
     104    TabOrder = 7
     105  end
     106  object ButtonRepeatMin: TButton
     107    Left = 8
     108    Height = 25
     109    Top = 160
     110    Width = 48
     111    Caption = 'Min'
     112    OnClick = ButtonRepeatMinClick
     113    TabOrder = 8
     114  end
     115  object ButtonRepeatMax: TButton
     116    Left = 264
     117    Height = 25
     118    Top = 160
     119    Width = 48
     120    Anchors = [akTop, akRight]
     121    Caption = 'Max'
     122    OnClick = ButtonRepeatMaxClick
     123    TabOrder = 9
     124  end
    87125end
  • trunk/Forms/UFormMove.lrt

    r34 r42  
    44TFORMMOVE.BUTTONCANCEL.CAPTION=Cancel
    55TFORMMOVE.LABEL2.CAPTION=Every turn:
     6TFORMMOVE.BUTTONONCEMIN.CAPTION=Min
     7TFORMMOVE.BUTTONONCEMAX.CAPTION=Max
     8TFORMMOVE.BUTTONREPEATMIN.CAPTION=Min
     9TFORMMOVE.BUTTONREPEATMAX.CAPTION=Max
  • trunk/Forms/UFormMove.pas

    r40 r42  
    1414
    1515  TFormMove = class(TForm)
     16    ButtonRepeatMax: TButton;
     17    ButtonOnceMin: TButton;
     18    ButtonOnceMax: TButton;
    1619    ButtonOk: TButton;
    1720    ButtonCancel: TButton;
     21    ButtonRepeatMin: TButton;
    1822    Label1: TLabel;
    1923    Label2: TLabel;
     
    2226    TrackBarOnce: TTrackBar;
    2327    TrackBarRepeat: TTrackBar;
     28    procedure ButtonOnceMaxClick(Sender: TObject);
     29    procedure ButtonRepeatMinClick(Sender: TObject);
     30    procedure uttonOnceMinClick(Sender: TObject);
     31    procedure ButtonRepeatMaxClick(Sender: TObject);
    2432    procedure FormShow(Sender: TObject);
    2533    procedure SpinEditOnceChange(Sender: TObject);
     
    6573end;
    6674
     75procedure TFormMove.ButtonOnceMaxClick(Sender: TObject);
     76begin
     77  TrackBarOnce.Position := TrackBarRepeat.Max;
     78end;
     79
     80procedure TFormMove.ButtonRepeatMinClick(Sender: TObject);
     81begin
     82  TrackBarRepeat.Position := TrackBarRepeat.Min;
     83end;
     84
     85procedure TFormMove.uttonOnceMinClick(Sender: TObject);
     86begin
     87  TrackBarOnce.Position := TrackBarOnce.Min;
     88end;
     89
     90procedure TFormMove.ButtonRepeatMaxClick(Sender: TObject);
     91begin
     92  TrackBarRepeat.Position := TrackBarRepeat.Max;
     93end;
     94
    6795procedure TFormMove.SpinEditRepeatChange(Sender: TObject);
    6896begin
  • trunk/Forms/UFormNew.lfm

    r41 r42  
    11object FormNew: TFormNew
    22  Left = 706
    3   Height = 505
     3  Height = 614
    44  Top = 455
    55  Width = 716
    66  Caption = 'New game'
    7   ClientHeight = 505
     7  ClientHeight = 614
    88  ClientWidth = 716
    99  OnCreate = FormCreate
     
    9797  object Panel2: TPanel
    9898    Left = 0
    99     Height = 330
     99    Height = 439
    100100    Top = 175
    101101    Width = 716
    102102    Align = alClient
    103103    BevelOuter = bvNone
    104     ClientHeight = 330
     104    ClientHeight = 439
    105105    ClientWidth = 716
    106106    TabOrder = 2
     
    108108      Left = 624
    109109      Height = 25
    110       Top = 283
     110      Top = 392
    111111      Width = 75
    112112      Anchors = [akRight, akBottom]
     
    118118      Left = 535
    119119      Height = 25
    120       Top = 283
     120      Top = 392
    121121      Width = 75
    122122      Anchors = [akBottom]
     
    286286    object ComboBoxGridType: TComboBox
    287287      Left = 312
    288       Height = 34
     288      Height = 30
    289289      Top = 201
    290290      Width = 208
     
    305305      ParentColor = False
    306306    end
     307    object Label6: TLabel
     308      Left = 8
     309      Height = 22
     310      Top = 313
     311      Width = 114
     312      Caption = 'Win objective:'
     313      ParentColor = False
     314    end
     315    object ComboBoxWinObjective: TComboBox
     316      Left = 160
     317      Height = 30
     318      Top = 305
     319      Width = 208
     320      ItemHeight = 0
     321      Items.Strings = (
     322        'Defeat all oponents'
     323        'Defeat all oponents cities'
     324        'Capture position'
     325        'Stay alive for number of turns'
     326      )
     327      Style = csDropDownList
     328      TabOrder = 13
     329    end
     330    object Label7: TLabel
     331      Left = 8
     332      Height = 22
     333      Top = 348
     334      Width = 211
     335      Caption = 'Max random neutral units:'
     336      ParentColor = False
     337    end
     338    object SpinEditNeutralUnits: TSpinEdit
     339      Left = 272
     340      Height = 32
     341      Top = 343
     342      Width = 98
     343      MaxValue = 99
     344      OnChange = SpinEditMapSizeYChange
     345      TabOrder = 14
     346      Value = 12
     347    end
    307348  end
    308349  object ActionList1: TActionList
  • trunk/Forms/UFormNew.lrt

    r41 r42  
    1818TFORMNEW.RADIOGROUPGROWCELLS.CAPTION=Growing cells
    1919TFORMNEW.LABEL5.CAPTION=Grid type:
     20TFORMNEW.LABEL6.CAPTION=Win objective:
     21TFORMNEW.LABEL7.CAPTION=Max random neutral units:
    2022TFORMNEW.APLAYERMODIFY.CAPTION=Modify player
    2123TFORMNEW.APLAYERADD.CAPTION=Add player
  • trunk/Forms/UFormNew.pas

    r41 r42  
    2626    CheckBoxVoid: TCheckBox;
    2727    ComboBoxGridType: TComboBox;
     28    ComboBoxWinObjective: TComboBox;
    2829    Label1: TLabel;
    2930    Label2: TLabel;
     
    3132    Label4: TLabel;
    3233    Label5: TLabel;
     34    Label6: TLabel;
     35    Label7: TLabel;
    3336    ListView1: TListView;
    3437    Panel1: TPanel;
     
    3942    SpinEditMapSizeX: TSpinEdit;
    4043    SpinEditMapSizeY: TSpinEdit;
     44    SpinEditNeutralUnits: TSpinEdit;
    4145    SpinEditVoidPercent: TSpinEdit;
    4246    Splitter1: TSplitter;
     
    228232  RadioGroupGrowCells.ItemIndex := Integer(Game.GrowCells);
    229233  ComboBoxGridType.ItemIndex := Integer(Game.MapType) - 1;
     234  ComboBoxWinObjective.ItemIndex := Integer(Game.WinObjective);
     235  SpinEditNeutralUnits.Value := Game.MaxNeutralUnits;
    230236end;
    231237
     
    250256  Game.GrowCells := TGrowCells(RadioGroupGrowCells.ItemIndex);
    251257  Game.MapType := TMapType(ComboBoxGridType.ItemIndex + 1);
     258  Game.WinObjective := TWinObjective(ComboBoxWinObjective.ItemIndex);
     259  Game.MaxNeutralUnits := SpinEditNeutralUnits.Value;
    252260end;
    253261
Note: See TracChangeset for help on using the changeset viewer.