Changeset 194 for trunk/Forms


Ignore:
Timestamp:
May 14, 2018, 5:38:45 PM (7 years ago)
Author:
chronos
Message:
  • Added: Configurable game parameter maximum units per cell.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.lfm

    r179 r194  
    11object FormNew: TFormNew
    2   Left = 596
    3   Height = 617
    4   Top = 243
    5   Width = 775
     2  Left = 387
     3  Height = 843
     4  Top = 102
     5  Width = 1069
    66  Caption = 'New game'
    7   ClientHeight = 617
    8   ClientWidth = 775
     7  ClientHeight = 843
     8  ClientWidth = 1069
    99  Constraints.MinHeight = 501
    1010  Constraints.MinWidth = 667
     
    1515  OnShow = FormShow
    1616  Position = poMainFormCenter
    17   LCLVersion = '1.8.0.6'
     17  LCLVersion = '1.8.2.0'
    1818  object PageControl1: TPageControl
    1919    Left = 4
    20     Height = 330
     20    Height = 556
    2121    Top = 4
    22     Width = 767
    23     ActivePage = TabSheetMode
     22    Width = 1061
     23    ActivePage = TabSheet2
    2424    Align = alClient
    2525    BorderSpacing.Around = 4
    26     TabIndex = 0
     26    TabIndex = 2
    2727    TabOrder = 0
    2828    object TabSheetMode: TTabSheet
     
    180180    object TabSheet2: TTabSheet
    181181      Caption = 'Map'
    182       ClientHeight = 297
    183       ClientWidth = 759
     182      ClientHeight = 523
     183      ClientWidth = 1053
    184184      object Label1: TLabel
    185185        Left = 8
     
    222222        Height = 47
    223223        Top = 8
    224         Width = 508
     224        Width = 802
    225225        Max = 100
    226226        Min = 2
     
    235235        Height = 47
    236236        Top = 49
    237         Width = 508
     237        Width = 802
    238238        Max = 100
    239239        Min = 2
     
    293293        Height = 27
    294294        Top = 110
    295         Width = 271
     295        Width = 565
    296296        Anchors = [akTop, akLeft, akRight]
    297297        AutoSize = False
     
    354354        Left = 408
    355355        Height = 28
    356         Top = 352
     356        Top = 384
    357357        Width = 98
    358358        MaxValue = 99
    359         OnChange = SpinEditMapSizeYChange
    360359        TabOrder = 11
    361360        Value = 12
     
    364363        Left = 8
    365364        Height = 20
    366         Top = 352
     365        Top = 384
    367366        Width = 172
    368367        Caption = 'Max random neutral units:'
     
    373372        Height = 28
    374373        Top = 184
    375         Width = 492
     374        Width = 786
    376375        Anchors = [akTop, akLeft, akRight]
    377376        TabOrder = 12
    378377      end
    379378      object ButtonImageBrowse: TButton
    380         Left = 644
     379        Left = 938
    381380        Height = 25
    382381        Top = 192
     
    402401        Caption = 'Bridges between cells'
    403402        TabOrder = 14
     403      end
     404      object SpinEditMaxPower: TSpinEdit
     405        Left = 408
     406        Height = 28
     407        Top = 344
     408        Width = 98
     409        MaxValue = 1000000
     410        MinValue = 1
     411        OnChange = SpinEditMaxPowerChange
     412        TabOrder = 15
     413        Value = 99
     414      end
     415      object Label10: TLabel
     416        Left = 8
     417        Height = 20
     418        Top = 344
     419        Width = 119
     420        Caption = 'Max units per cell:'
     421        ParentColor = False
    404422      end
    405423    end
     
    491509    Left = 0
    492510    Height = 45
    493     Top = 572
    494     Width = 775
     511    Top = 798
     512    Width = 1069
    495513    Align = alBottom
    496514    BevelOuter = bvNone
    497515    ClientHeight = 45
    498     ClientWidth = 775
     516    ClientWidth = 1069
    499517    TabOrder = 1
    500518    object ButtonOk: TButton
    501       Left = 587
     519      Left = 881
    502520      Height = 25
    503521      Top = 6
     
    509527    end
    510528    object ButtonCancel: TButton
    511       Left = 691
     529      Left = 985
    512530      Height = 25
    513531      Top = 6
     
    522540    Left = 0
    523541    Height = 228
    524     Top = 344
    525     Width = 775
     542    Top = 570
     543    Width = 1069
    526544    Align = alBottom
    527545    BevelOuter = bvNone
     
    532550    Left = 0
    533551    Height = 6
    534     Top = 338
    535     Width = 775
     552    Top = 564
     553    Width = 1069
    536554    Align = alBottom
    537555    ResizeAnchor = akBottom
  • trunk/Forms/UFormNew.pas

    r193 r194  
    3636    EditImageFile: TEdit;
    3737    Label1: TLabel;
     38    Label10: TLabel;
    3839    Label11: TLabel;
    3940    Label12: TLabel;
     
    6162    RadioGroupGrowAmount: TRadioGroup;
    6263    RadioGroupGrowCells: TRadioGroup;
     64    SpinEditMaxPower: TSpinEdit;
    6365    SpinEditServerPort: TSpinEdit;
    6466    SpinEditCityPercent: TSpinEdit;
     
    98100    procedure SpinEditMapSizeXChange(Sender: TObject);
    99101    procedure SpinEditMapSizeYChange(Sender: TObject);
     102    procedure SpinEditMaxPowerChange(Sender: TObject);
    100103    procedure TrackBarSizeYChange(Sender: TObject);
    101104    procedure TrackBarSizeXChange(Sender: TObject);
     
    191194end;
    192195
     196procedure TFormNew.SpinEditMaxPowerChange(Sender: TObject);
     197begin
     198  UpdateInterface;
     199end;
     200
    193201procedure TFormNew.TrackBarSizeYChange(Sender: TObject);
    194202begin
     
    268276  SpinEditServerPort.Enabled := RadioButtonModeNetworkServer.Checked;
    269277  ListViewServers.Enabled := RadioButtonModeNetworkClient.Checked;
     278  PanelChat.Visible := RadioButtonModeNetworkClient.Checked or RadioButtonModeNetworkServer.Checked;
     279  SpinEditNeutralUnits.MaxValue := SpinEditMaxPower.Value;
    270280end;
    271281
     
    402412    EditServerAddress.Text := LocalNetworkAddress;
    403413    SpinEditServerPort.Value := LocalNetworkPort;
     414    SpinEditMaxPower.Value := Game.MaxPower;
    404415  end;
    405416end;
     
    429440    Game.FogOfWar := CheckBoxFogOfWar.Checked;
    430441    Game.BridgeEnabled := CheckBoxBridges.Checked;
     442    Game.MaxPower := SpinEditMaxPower.Value;
    431443  end;
    432444end;
Note: See TracChangeset for help on using the changeset viewer.