Ignore:
Timestamp:
May 14, 2018, 5:38:45 PM (6 years ago)
Author:
chronos
Message:
  • Added: Configurable game parameter maximum units per cell.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.