close Warning: Can't synchronize with repository "(default)" (No changeset 184 in the repository). Look in the Trac log for more information.

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/UFormCharts.pas

    r128 r130  
    2323  public
    2424    procedure Redraw;
     25    procedure Translate;
    2526  end;
    2627
     
    3435uses
    3536  UCore, UGame;
     37
     38resourcestring
     39  SOccupiedCells = 'Occupied cells';
     40  SMilitaryPower = 'Military power';
     41  SDiscoveredCells = 'Discovered cells';
     42  SCitiesCount = 'Cities count';
     43
    3644
    3745{ TFormCharts }
     
    5058begin
    5159  Core.PersistentForm.Load(Self);
     60  if (ComboBox1.ItemIndex = -1) and (ComboBox1.Items.Count > 0) then
     61    ComboBox1.ItemIndex := 0;
    5262  Redraw;
     63  Translate;
    5364end;
    5465
     
    7485end;
    7586
     87procedure TFormCharts.Translate;
     88var
     89  LastIndex: Integer;
     90begin
     91  with ComboBox1 do begin
     92    LastIndex := ItemIndex;
     93    Clear;
     94    Items.Add(SOccupiedCells);
     95    Items.Add(SMilitaryPower);
     96    Items.Add(SDiscoveredCells);
     97    Items.Add(SCitiesCount);
     98    ItemIndex := LastIndex;
     99  end;
     100end;
     101
    76102end.
    77103
Note: See TracChangeset for help on using the changeset viewer.