Changeset 283 for trunk/Forms/UFormGameSystem.pas
- Timestamp:
- Mar 10, 2019, 5:33:06 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormGameSystem.pas
r278 r283 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, UGameSystem, UFormUnitKinds ;9 ComCtrls, UGameSystem, UFormUnitKinds, UFormNations; 10 10 11 11 type … … 24 24 PageControl1: TPageControl; 25 25 SaveDialog1: TSaveDialog; 26 TabSheetNations: TTabSheet; 26 27 TabSheetGeneral: TTabSheet; 27 28 TabSheetUnits: TTabSheet; … … 35 36 FGameSystem: TGameSystem; 36 37 FormUnitKinds: TFormUnitKinds; 38 FormNations: TFormNations; 37 39 procedure SetGameSystem(AValue: TGameSystem); 38 40 public … … 94 96 FormUnitKinds.Align := alClient; 95 97 FormUnitKinds.Visible := True; 98 FormNations := TFormNations.Create(nil); 99 FormNations.ManualDock(TabSheetNations, nil, alClient); 100 FormNations.Align := alClient; 101 FormNations.Visible := True; 96 102 end; 97 103 … … 99 105 begin 100 106 GameSystem := nil; 107 FreeAndNil(FormNations); 101 108 FreeAndNil(FormUnitKinds); 102 109 end; … … 110 117 begin 111 118 if FGameSystem = AValue then Exit; 112 if Assigned(FGameSystem) then FormUnitKinds.UnitKinds := nil; 119 if Assigned(FGameSystem) then begin 120 FormUnitKinds.UnitKinds := nil; 121 FormNations.Nations := nil; 122 end; 113 123 FGameSystem := AValue; 114 if Assigned(FGameSystem) then FormUnitKinds.UnitKinds := GameSystem.UnitKinds; 124 if Assigned(FGameSystem) then begin 125 FormUnitKinds.UnitKinds := GameSystem.UnitKinds; 126 FormNations.Nations := GameSystem.Nations; 127 end; 115 128 end; 116 129 … … 121 134 CheckBoxUnitsSplitMerge.Checked := GameSystem.UnitsSplitMerge; 122 135 CheckBoxUnitsMoveImmediately.Checked := GameSystem.UnitsMoveImmediately; 136 FormNations.UpdateList; 137 FormNations.UpdateInterface; 138 FormUnitKinds.UpdateList; 139 FormUnitKinds.UpdateInterface; 123 140 end; 124 141
Note:
See TracChangeset
for help on using the changeset viewer.