Changeset 283 for trunk


Ignore:
Timestamp:
Mar 10, 2019, 5:33:06 PM (6 years ago)
Author:
chronos
Message:
  • Added: Allow to manage nations for each game system.
Location:
trunk
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormGameSystem.lfm

    r277 r283  
    5858    Top = 16
    5959    Width = 744
    60     ActivePage = TabSheetUnits
     60    ActivePage = TabSheetNations
    6161    Anchors = [akTop, akLeft, akRight, akBottom]
    62     TabIndex = 1
     62    TabIndex = 2
    6363    TabOrder = 4
    6464    object TabSheetGeneral: TTabSheet
     
    9494      Caption = 'Units'
    9595    end
     96    object TabSheetNations: TTabSheet
     97      Caption = 'Nations'
     98    end
    9699  end
    97100  object OpenDialog1: TOpenDialog
  • trunk/Forms/UFormGameSystem.pas

    r278 r283  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, UGameSystem, UFormUnitKinds;
     9  ComCtrls, UGameSystem, UFormUnitKinds, UFormNations;
    1010
    1111type
     
    2424    PageControl1: TPageControl;
    2525    SaveDialog1: TSaveDialog;
     26    TabSheetNations: TTabSheet;
    2627    TabSheetGeneral: TTabSheet;
    2728    TabSheetUnits: TTabSheet;
     
    3536    FGameSystem: TGameSystem;
    3637    FormUnitKinds: TFormUnitKinds;
     38    FormNations: TFormNations;
    3739    procedure SetGameSystem(AValue: TGameSystem);
    3840  public
     
    9496  FormUnitKinds.Align := alClient;
    9597  FormUnitKinds.Visible := True;
     98  FormNations := TFormNations.Create(nil);
     99  FormNations.ManualDock(TabSheetNations, nil, alClient);
     100  FormNations.Align := alClient;
     101  FormNations.Visible := True;
    96102end;
    97103
     
    99105begin
    100106  GameSystem := nil;
     107  FreeAndNil(FormNations);
    101108  FreeAndNil(FormUnitKinds);
    102109end;
     
    110117begin
    111118  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;
    113123  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;
    115128end;
    116129
     
    121134  CheckBoxUnitsSplitMerge.Checked := GameSystem.UnitsSplitMerge;
    122135  CheckBoxUnitsMoveImmediately.Checked := GameSystem.UnitsMoveImmediately;
     136  FormNations.UpdateList;
     137  FormNations.UpdateInterface;
     138  FormUnitKinds.UpdateList;
     139  FormUnitKinds.UpdateInterface;
    123140end;
    124141
  • trunk/Languages/xtactics.cs.po

    r282 r283  
    250250msgstr "Obecné"
    251251
     252#: tformgamesystem.tabsheetnations.caption
     253msgctxt "tformgamesystem.tabsheetnations.caption"
     254msgid "Nations"
     255msgstr "Národy"
     256
    252257#: tformgamesystem.tabsheetunits.caption
    253258msgctxt "tformgamesystem.tabsheetunits.caption"
     
    443448msgstr "   "
    444449
     450#: tformnation.buttoncancel.caption
     451#, fuzzy
     452msgctxt "tformnation.buttoncancel.caption"
     453msgid "Cancel"
     454msgstr "Zrušit"
     455
     456#: tformnation.buttonok.caption
     457#, fuzzy
     458msgctxt "tformnation.buttonok.caption"
     459msgid "OK"
     460msgstr "OK"
     461
     462#: tformnation.caption
     463#, fuzzy
     464#| msgid "Start units"
     465msgctxt "tformnation.caption"
     466msgid "Nation"
     467msgstr "Počátečních jednotek"
     468
     469#: tformnation.labelhealth.caption
     470#, fuzzy
     471msgctxt "tformnation.labelhealth.caption"
     472msgid "Color:"
     473msgstr "Barva:"
     474
     475#: tformnation.labelname.caption
     476#, fuzzy
     477msgctxt "tformnation.labelname.caption"
     478msgid "Name:"
     479msgstr "Jméno:"
     480
     481#: tformnations.aadd.caption
     482#, fuzzy
     483msgctxt "tformnations.aadd.caption"
     484msgid "Add"
     485msgstr "Přidat"
     486
     487#: tformnations.aclone.caption
     488#, fuzzy
     489msgctxt "tformnations.aclone.caption"
     490msgid "Clone"
     491msgstr "Klonovat"
     492
     493#: tformnations.amodify.caption
     494#, fuzzy
     495msgctxt "tformnations.amodify.caption"
     496msgid "Modify"
     497msgstr "Upravit"
     498
     499#: tformnations.aremove.caption
     500#, fuzzy
     501msgctxt "tformnations.aremove.caption"
     502msgid "Remove"
     503msgstr "Odstranit"
     504
     505#: tformnations.aselectall.caption
     506#, fuzzy
     507msgctxt "tformnations.aselectall.caption"
     508msgid "Select all"
     509msgstr "Vybrat vše"
     510
     511#: tformnations.caption
     512msgctxt "tformnations.caption"
     513msgid "Nations"
     514msgstr "Národy"
     515
     516#: tformnations.listview1.columns[0].caption
     517#, fuzzy
     518msgctxt "tformnations.listview1.columns[0].caption"
     519msgid "Name"
     520msgstr "Jméno"
     521
     522#: tformnations.listview1.columns[1].caption
     523msgctxt "tformnations.listview1.columns[1].caption"
     524msgid "Color"
     525msgstr "Barva"
     526
     527#: tformnations.listview1.columns[2].caption
     528msgid "Bonuses"
     529msgstr "Bonusy"
     530
    445531#: tformnew.aserveradd.caption
    446532msgctxt "tformnew.aserveradd.caption"
     
    667753
    668754#: tformplayer.label3.caption
     755msgctxt "tformplayer.label3.caption"
    669756msgid "Color:"
    670757msgstr "Barva:"
     
    680767#: tformplayer.label6.caption
    681768msgid "Nation:"
    682 msgstr ""
     769msgstr "Národ:"
    683770
    684771#: tformplayers.aadd.caption
     
    11021189msgstr "tah"
    11031190
     1191#: uformnations.snewunitkind
     1192msgid "New nation"
     1193msgstr "Nový národ"
     1194
     1195#: uformnations.sremoveitems
     1196#, fuzzy
     1197msgctxt "uformnations.sremoveitems"
     1198msgid "Remove items"
     1199msgstr "Odstranit položky"
     1200
     1201#: uformnations.sremoveitemsquery
     1202#, fuzzy
     1203msgctxt "uformnations.sremoveitemsquery"
     1204msgid "Do you want to remove selected items?"
     1205msgstr "Opravdu chcete odstranit vybrané položky?"
     1206
    11041207#: uformnew.sfromimagefile
    11051208msgid "From image file"
     
    13231426msgid "64-bit UInt read overflow."
    13241427msgstr "Přetečení při čtení 64-bit UInt"
    1325 
  • trunk/Languages/xtactics.po

    r282 r283  
    240240msgstr ""
    241241
     242#: tformgamesystem.tabsheetnations.caption
     243msgctxt "tformgamesystem.tabsheetnations.caption"
     244msgid "Nations"
     245msgstr ""
     246
    242247#: tformgamesystem.tabsheetunits.caption
    243248msgctxt "tformgamesystem.tabsheetunits.caption"
     
    432437msgstr ""
    433438
     439#: tformnation.buttoncancel.caption
     440msgctxt "tformnation.buttoncancel.caption"
     441msgid "Cancel"
     442msgstr ""
     443
     444#: tformnation.buttonok.caption
     445msgctxt "tformnation.buttonok.caption"
     446msgid "OK"
     447msgstr ""
     448
     449#: tformnation.caption
     450msgctxt "tformnation.caption"
     451msgid "Nation"
     452msgstr ""
     453
     454#: tformnation.labelhealth.caption
     455msgctxt "tformnation.labelhealth.caption"
     456msgid "Color:"
     457msgstr ""
     458
     459#: tformnation.labelname.caption
     460msgctxt "tformnation.labelname.caption"
     461msgid "Name:"
     462msgstr ""
     463
     464#: tformnations.aadd.caption
     465msgctxt "tformnations.aadd.caption"
     466msgid "Add"
     467msgstr ""
     468
     469#: tformnations.aclone.caption
     470msgctxt "tformnations.aclone.caption"
     471msgid "Clone"
     472msgstr ""
     473
     474#: tformnations.amodify.caption
     475msgctxt "tformnations.amodify.caption"
     476msgid "Modify"
     477msgstr ""
     478
     479#: tformnations.aremove.caption
     480msgctxt "tformnations.aremove.caption"
     481msgid "Remove"
     482msgstr ""
     483
     484#: tformnations.aselectall.caption
     485msgctxt "tformnations.aselectall.caption"
     486msgid "Select all"
     487msgstr ""
     488
     489#: tformnations.caption
     490msgctxt "tformnations.caption"
     491msgid "Nations"
     492msgstr ""
     493
     494#: tformnations.listview1.columns[0].caption
     495msgctxt "tformnations.listview1.columns[0].caption"
     496msgid "Name"
     497msgstr ""
     498
     499#: tformnations.listview1.columns[1].caption
     500msgctxt "tformnations.listview1.columns[1].caption"
     501msgid "Color"
     502msgstr ""
     503
     504#: tformnations.listview1.columns[2].caption
     505msgid "Bonuses"
     506msgstr ""
     507
    434508#: tformnew.aserveradd.caption
    435509msgctxt "tformnew.aserveradd.caption"
     
    654728
    655729#: tformplayer.label3.caption
     730msgctxt "tformplayer.label3.caption"
    656731msgid "Color:"
    657732msgstr ""
     
    709784
    710785#: tformplayers.listview1.columns[2].caption
     786msgctxt "tformplayers.listview1.columns[2].caption"
    711787msgid "Color"
    712788msgstr ""
     
    10751151msgstr ""
    10761152
     1153#: uformnations.snewunitkind
     1154msgid "New nation"
     1155msgstr ""
     1156
     1157#: uformnations.sremoveitems
     1158msgctxt "uformnations.sremoveitems"
     1159msgid "Remove items"
     1160msgstr ""
     1161
     1162#: uformnations.sremoveitemsquery
     1163msgctxt "uformnations.sremoveitemsquery"
     1164msgid "Do you want to remove selected items?"
     1165msgstr ""
     1166
    10771167#: uformnew.sfromimagefile
    10781168msgid "From image file"
  • trunk/xtactics.lpi

    r282 r283  
    109109      </Item7>
    110110    </RequiredPackages>
    111     <Units Count="42">
     111    <Units Count="45">
    112112      <Unit0>
    113113        <Filename Value="xtactics.lpr"/>
     
    338338        <IsPartOfProject Value="True"/>
    339339      </Unit41>
     340      <Unit42>
     341        <Filename Value="Forms/UFormAbout.lfm"/>
     342        <IsPartOfProject Value="True"/>
     343      </Unit42>
     344      <Unit43>
     345        <Filename Value="Forms/UFormNation.pas"/>
     346        <IsPartOfProject Value="True"/>
     347        <ComponentName Value="FormNation"/>
     348        <HasResources Value="True"/>
     349        <ResourceBaseClass Value="Form"/>
     350      </Unit43>
     351      <Unit44>
     352        <Filename Value="Forms/UFormNations.pas"/>
     353        <IsPartOfProject Value="True"/>
     354        <ComponentName Value="FormNations"/>
     355        <HasResources Value="True"/>
     356        <ResourceBaseClass Value="Form"/>
     357      </Unit44>
    340358    </Units>
    341359  </ProjectOptions>
Note: See TracChangeset for help on using the changeset viewer.