Changeset 277 for trunk/Forms
- Timestamp:
- Feb 5, 2019, 11:17:27 PM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormGameSystem.lfm
r276 r277 10 10 OnClose = FormClose 11 11 OnCreate = FormCreate 12 OnDestroy = FormDestroy 12 13 OnShow = FormShow 13 14 LCLVersion = '1.8.4.0' … … 37 38 Top = 528 38 39 Width = 113 39 Anchors = [akRight ]40 Anchors = [akRight, akBottom] 40 41 Caption = 'Cancel' 41 42 ModalResult = 2 … … 57 58 Top = 16 58 59 Width = 744 59 ActivePage = TabSheet General60 ActivePage = TabSheetUnits 60 61 Anchors = [akTop, akLeft, akRight, akBottom] 61 TabIndex = 062 TabIndex = 1 62 63 TabOrder = 4 63 64 object TabSheetGeneral: TTabSheet -
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 -
trunk/Forms/UFormGameSystems.pas
r276 r277 124 124 if FormGameSystem.ShowModal = mrOk then begin 125 125 FormGameSystem.SaveData(TempEntry); 126 TGameSystem(ListView1.Selected.Data).Assign(TempEntry); 126 GameSystems.Add(TempEntry); 127 TempEntry := nil; 127 128 UpdateList; 128 129 UpdateInterface; … … 197 198 AModify.Enabled := Assigned(FGameSystems) and Assigned(ListView1.Selected); 198 199 AAdd.Enabled := Assigned(FGameSystems); 199 ASelectAll.Enabled := True;200 ASelectAll.Enabled := ListView1.Items.Count > 0; 200 201 end; 201 202
Note:
See TracChangeset
for help on using the changeset viewer.