Changeset 289 for trunk/Forms


Ignore:
Timestamp:
Mar 24, 2019, 11:15:07 PM (6 years ago)
Author:
chronos
Message:
  • Added: Allow to add building kinds to game system.
Location:
trunk/Forms
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormGameSystem.lfm

    r283 r289  
    1212  OnDestroy = FormDestroy
    1313  OnShow = FormShow
    14   LCLVersion = '1.8.4.0'
     14  LCLVersion = '2.0.0.4'
    1515  object ButtonSave: TButton
    1616    Left = 160
     
    5858    Top = 16
    5959    Width = 744
    60     ActivePage = TabSheetNations
     60    ActivePage = TabSheetBuildings
    6161    Anchors = [akTop, akLeft, akRight, akBottom]
    62     TabIndex = 2
     62    TabIndex = 3
    6363    TabOrder = 4
    6464    object TabSheetGeneral: TTabSheet
     
    9797      Caption = 'Nations'
    9898    end
     99    object TabSheetBuildings: TTabSheet
     100      Caption = 'Buildings'
     101    end
    99102  end
    100103  object OpenDialog1: TOpenDialog
  • trunk/Forms/UFormGameSystem.pas

    r284 r289  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, UGameSystem, UFormUnitKinds, UFormNations;
     9  ComCtrls, UGameSystem, UFormUnitKinds, UFormNations, UFormBuildingKinds;
    1010
    1111type
     
    2424    PageControl1: TPageControl;
    2525    SaveDialog1: TSaveDialog;
     26    TabSheetBuildings: TTabSheet;
    2627    TabSheetNations: TTabSheet;
    2728    TabSheetGeneral: TTabSheet;
     
    3738    FormUnitKinds: TFormUnitKinds;
    3839    FormNations: TFormNations;
     40    FormBuildingKinds: TFormBuildingKinds;
    3941    procedure SetGameSystem(AValue: TGameSystem);
    4042  public
     
    100102  FormNations.Align := alClient;
    101103  FormNations.Visible := True;
     104  FormBuildingKinds := TFormBuildingKinds.Create(nil);
     105  FormBuildingKinds.ManualDock(TabSheetBuildings, nil, alClient);
     106  FormBuildingKinds.Align := alClient;
     107  FormBuildingKinds.Visible := True;
    102108end;
    103109
     
    107113  FreeAndNil(FormNations);
    108114  FreeAndNil(FormUnitKinds);
     115  FreeAndNil(FormBuildingKinds);
    109116end;
    110117
     
    120127    FormUnitKinds.UnitKinds := nil;
    121128    FormNations.Nations := nil;
     129    FormBuildingKinds.BuildingKinds := nil;
    122130  end;
    123131  FGameSystem := AValue;
     
    125133    FormUnitKinds.UnitKinds := GameSystem.UnitKinds;
    126134    FormNations.Nations := GameSystem.Nations;
     135    FormBuildingKinds.BuildingKinds := GameSystem.BuildingKinds;
    127136  end;
    128137end;
     
    138147  FormUnitKinds.UpdateList;
    139148  FormUnitKinds.UpdateInterface;
     149  FormBuildingKinds.UpdateList;
     150  FormBuildingKinds.UpdateInterface;
    140151  Caption := ExtractFileName(Self.GameSystem.FileName) + ' - ' + SGameSystem;
    141152end;
Note: See TracChangeset for help on using the changeset viewer.