Ignore:
Timestamp:
Jun 18, 2017, 11:27:44 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Require at least 2 players for a game.
  • Fixed: Translate more strings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.pas

    r125 r130  
    9090    procedure Translate;
    9191    procedure ReloadView;
     92    procedure UpdateInterface;
    9293    procedure Load(Game: TGame);
    9394    procedure Save(Game: TGame);
     
    229230  ListView1.Items.Count := Players.Count;
    230231  ListView1.Refresh;
    231   ButtonPlayerRemove.Enabled := Assigned(ListView1.Selected) and (Players.Count > 1);
    232   ButtonPlayerAdd.Enabled := Players.Count < MaxPlayerCount;
     232  Translate;
     233  UpdateInterface;
     234end;
     235
     236procedure TFormNew.UpdateInterface;
     237begin
     238  APlayerRemove.Enabled := Assigned(ListView1.Selected) and (Players.Count > 2);
     239  APlayerAdd.Enabled := Players.Count < MaxPlayerCount;
    233240  APlayerModify.Enabled := Assigned(ListView1.Selected);
    234241  EditImageFile.Enabled := ComboBoxMapShape.ItemIndex = Integer(msImage);
    235242  ButtonImageBrowse.Enabled := ComboBoxMapShape.ItemIndex = Integer(msImage);
    236   Translate;
    237243end;
    238244
Note: See TracChangeset for help on using the changeset viewer.