Changeset 277 for trunk/Forms/UFormGameSystem.pas
- Timestamp:
- Feb 5, 2019, 11:17:27 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormGameSystem.pas
r276 r277 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, UGameSystem ;9 ComCtrls, UGameSystem, UFormUnitKinds; 10 10 11 11 type … … 30 30 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 31 31 procedure FormCreate(Sender: TObject); 32 procedure FormDestroy(Sender: TObject); 32 33 procedure FormShow(Sender: TObject); 33 34 private 34 35 FGameSystem: TGameSystem; 36 FormUnitKinds: TFormUnitKinds; 35 37 procedure SetGameSystem(AValue: TGameSystem); 36 37 38 public 38 39 property GameSystem: TGameSystem read FGameSystem write SetGameSystem; … … 89 90 Core.ThemeManager1.UseTheme(Self); 90 91 Core.CoolTranslator1.TranslateComponentRecursive(Self); 92 FormUnitKinds := TFormUnitKinds.Create(nil); 93 FormUnitKinds.ManualDock(TabSheetUnits, nil, alClient); 94 FormUnitKinds.Align := alClient; 95 FormUnitKinds.Visible := True; 96 end; 97 98 procedure TFormGameSystem.FormDestroy(Sender: TObject); 99 begin 100 FormUnitKinds.Free; 91 101 end; 92 102 … … 99 109 begin 100 110 if FGameSystem = AValue then Exit; 111 if Assigned(FGameSystem) then FormUnitKinds.UnitKinds := nil; 101 112 FGameSystem := AValue; 113 if Assigned(FGameSystem) then FormUnitKinds.UnitKinds := GameSystem.UnitKinds; 102 114 end; 103 115
Note:
See TracChangeset
for help on using the changeset viewer.