Ignore:
Timestamp:
Mar 24, 2019, 11:15:07 PM (6 years ago)
Author:
chronos
Message:
  • Added: Allow to add building kinds to game system.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.