Ignore:
Timestamp:
Feb 3, 2019, 11:55:30 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Load/save game syste name correctly from/to file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.pas

    r275 r276  
    3333    ButtonPlayerModify: TButton;
    3434    ButtonPlayerRemove: TButton;
    35     CheckBoxUnitsSplitMerge: TCheckBox;
    36     CheckBoxEmptyCellsNeutral: TCheckBox;
    3735    CheckBoxBridges: TCheckBox;
    3836    CheckBoxCity: TCheckBox;
     
    4038    CheckBoxFogOfWar: TCheckBox;
    4139    CheckBoxSymetricMap: TCheckBox;
    42     CheckBoxUnitsMoveImmediately: TCheckBox;
    4340    CheckBoxVoid: TCheckBox;
    4441    ComboBoxGameSystem: TComboBox;
     
    192189uses
    193190  UFormPlayer, UFormChat, UCore, UFormServer, UClientGUI, UFormClient,
    194   UFormGameSystems;
     191  UFormGameSystems, UGameSystem;
    195192
    196193resourcestring
     
    367364    SpinEditTurns.Value := StayAliveForDefinedTurns;
    368365    SpinEditSpecialCells.Value := SpecialCaptureCellCount;
    369     CheckBoxEmptyCellsNeutral.Checked := GameSystem.EmptyCellsNeutral;
    370     CheckBoxUnitsSplitMerge.Checked := GameSystem.UnitsSplitMerge;
    371     CheckBoxUnitsMoveImmediately.Checked := GameSystem.UnitsMoveImmediately;
     366    ComboBoxGameSystem.ItemIndex := ComboBoxGameSystem.Items.IndexOf(GameSystemName);
    372367  end;
    373368end;
     
    398393    StayAliveForDefinedTurns := SpinEditTurns.Value;
    399394    SpecialCaptureCellCount := SpinEditSpecialCells.Value;
    400     GameSystem.EmptyCellsNeutral := CheckBoxEmptyCellsNeutral.Checked;
    401     GameSystem.UnitsSplitMerge := CheckBoxUnitsSplitMerge.Checked;
    402     GameSystem.UnitsMoveImmediately := CheckBoxUnitsMoveImmediately.Checked;
     395    GameSystem := TGameSystem(ComboBoxGameSystem.Items.Objects[ComboBoxGameSystem.ItemIndex]);
     396    GameSystemName := GameSystem.GetName;
    403397  end;
    404398end;
     
    424418      ComboBoxGameSystem.Items.Add('');
    425419    for I := 0 to Core.GameSystems.Count - 1 do begin
    426       ComboBoxGameSystem.Items[I] := Core.GameSystems[I].Name;
     420      ComboBoxGameSystem.Items[I] := Core.GameSystems[I].GetName;
    427421      ComboBoxGameSystem.Items.Objects[I] := Core.GameSystems[I];
    428422    end;
     
    558552  Core.PersistentForm.Load(Self);
    559553  Core.ThemeManager1.UseTheme(Self);
    560   ReloadGameSystemsMenu;
    561554  ReloadView;
    562555  //Height := Trunc(1.5 * Height);
     
    773766procedure TFormNew.Load(Server: TServer);
    774767begin
     768  ReloadGameSystemsMenu;
    775769  with Server do begin
    776770    RadioButtonModeLocal.Checked := Mode = smLocal;
Note: See TracChangeset for help on using the changeset viewer.