Changeset 330


Ignore:
Timestamp:
Jul 19, 2024, 9:46:33 PM (7 weeks ago)
Author:
chronos
Message:
  • Fixed: New game symetric map units calcualtion.
  • Fixed: Map preview with cell and unit borders.
  • Fixed: Allow to set preferred game system grid type.
Location:
trunk
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClientGUI.pas

    r318 r330  
    195195      Pen.Width := 0;
    196196    end;
     197
     198    // Cannot set clear border as it will display shifted on gtk2
     199    //Pen.Style := psClear;
     200    Pen.Style := psSolid;
     201    if CellGridVisible then begin
     202      Pen.Color := clBlack;
     203      Pen.Width := Round(2 * View.Zoom);
     204    end else begin
     205      Pen.Color := Brush.Color;
     206      Pen.Width := 0;
     207    end;
     208
    197209    // Transform view
    198210    SetLength(Points, Length(Cell.Polygon.Points));
     
    684696    else NewZoom := Factor.Y;
    685697  if NewZoom = 0 then NewZoom := 1;
    686   Zoom := NewZoom;
     698  Zoom := NewZoom * 0.9;
    687699  CenterMap;
    688700end;
  • trunk/Core.pas

    r328 r330  
    610610procedure TCore.UpdateOtherForms;
    611611begin
    612   if Assigned(FormMain.FormCharts) and FormMain.FormCharts.Visible then FormMain.FormCharts.Redraw;
    613   if Assigned(FormMain.FormUnitMoves) and FormMain.FormUnitMoves.Visible then FormMain.FormUnitMoves.ReloadList;
    614   if Assigned(FormMain.FormPlayersStats) and FormMain.FormPlayersStats.Visible then FormMain.FormPlayersStats.ReloadList;
     612  if Assigned(FormMain.FormCharts) and FormMain.FormCharts.Visible then
     613    FormMain.FormCharts.Redraw;
     614  if Assigned(FormMain.FormUnitMoves) and FormMain.FormUnitMoves.Visible then
     615    FormMain.FormUnitMoves.ReloadList;
     616  if Assigned(FormMain.FormPlayersStats) and FormMain.FormPlayersStats.Visible then
     617    FormMain.FormPlayersStats.ReloadList;
    615618end;
    616619
     
    633636  NewUnitKind: TUnitKind;
    634637  SystemsDir: string;
     638const
     639  GameSystemsDirName = 'Systems';
     640  DefaultGameSystemName = 'Default';
    635641begin
    636642  if GameFilesDir <> '' then
    637     SystemsDir := GameFilesDir + DirectorySeparator + 'Systems'
    638     else SystemsDir := 'Systems';
     643    SystemsDir := GameFilesDir + DirectorySeparator + GameSystemsDirName
     644    else SystemsDir := GameSystemsDirName;
    639645  if DirectoryExists(SystemsDir) then begin
    640646    GameSystems.LoadFromDir(SystemsDir);
     
    642648    // Create default game system if the directory with definitions was not found
    643649    NewGameSystem := TGameSystem.Create;
    644     NewGameSystem.FileName := 'HexWars';
     650    NewGameSystem.FileName := DefaultGameSystemName;
    645651    NewUnitKind := TUnitKind.Create;
    646652    NewUnitKind.Name := 'Unit';
  • trunk/Forms/FormGameSystem.lfm

    r325 r330  
    6767    object TabSheetGeneral: TTabSheet
    6868      Caption = 'General'
    69       ClientHeight = 360
    70       ClientWidth = 603
     69      ClientHeight = 362
     70      ClientWidth = 605
    7171      ParentFont = False
    7272      object CheckBoxEmptyCellsNeutral: TCheckBox
    7373        Left = 16
    74         Height = 30
     74        Height = 29
    7575        Top = 16
    76         Width = 357
     76        Width = 330
    7777        Caption = 'Set cells without player units as neutral'
    7878        ParentFont = False
     
    8181      object CheckBoxUnitsSplitMerge: TCheckBox
    8282        Left = 16
    83         Height = 30
     83        Height = 29
    8484        Top = 55
    85         Width = 229
     85        Width = 213
    8686        Caption = 'Units can split or merge'
    8787        ParentFont = False
     
    9090      object CheckBoxUnitsMoveImmediately: TCheckBox
    9191        Left = 16
    92         Height = 30
     92        Height = 29
    9393        Top = 95
    94         Width = 232
     94        Width = 217
    9595        Caption = 'Units move immediately'
    9696        ParentFont = False
    9797        TabOrder = 2
     98      end
     99      object Label5: TLabel
     100        Left = 16
     101        Height = 25
     102        Top = 136
     103        Width = 153
     104        Caption = 'Preferred grid type:'
     105        ParentColor = False
     106        ParentFont = False
     107      end
     108      object ComboBoxPreferredGridType: TComboBox
     109        Left = 272
     110        Height = 33
     111        Top = 136
     112        Width = 304
     113        ItemHeight = 25
     114        Items.Strings = (
     115          'None'
     116          'Hexagon vertical'
     117          'Square'
     118          'Triangular'
     119          'Random'
     120          'Isometric'
     121          'Hexagon horizontal'
     122        )
     123        ParentFont = False
     124        Style = csDropDownList
     125        TabOrder = 3
    98126      end
    99127    end
  • trunk/Forms/FormGameSystem.lrj

    r317 r330  
    99{"hash":49324869,"name":"tformgamesystem.checkboxunitssplitmerge.caption","sourcebytes":[85,110,105,116,115,32,99,97,110,32,115,112,108,105,116,32,111,114,32,109,101,114,103,101],"value":"Units can split or merge"},
    1010{"hash":113503305,"name":"tformgamesystem.checkboxunitsmoveimmediately.caption","sourcebytes":[85,110,105,116,115,32,109,111,118,101,32,105,109,109,101,100,105,97,116,101,108,121],"value":"Units move immediately"},
     11{"hash":94511754,"name":"tformgamesystem.label5.caption","sourcebytes":[80,114,101,102,101,114,114,101,100,32,103,114,105,100,32,116,121,112,101,58],"value":"Preferred grid type:"},
    1112{"hash":6049971,"name":"tformgamesystem.tabsheetunits.caption","sourcebytes":[85,110,105,116,115],"value":"Units"},
    1213{"hash":76219907,"name":"tformgamesystem.tabsheetnations.caption","sourcebytes":[78,97,116,105,111,110,115],"value":"Nations"},
  • trunk/Forms/FormGameSystem.pas

    r317 r330  
    1919    CheckBoxUnitsMoveImmediately: TCheckBox;
    2020    CheckBoxUnitsSplitMerge: TCheckBox;
     21    ComboBoxPreferredGridType: TComboBox;
     22    Label5: TLabel;
    2123    OpenDialog1: TOpenDialog;
    2224    PageControl1: TPageControl;
     
    3638    FormBuildingKinds: TFormList;
    3739    procedure SetGameSystem(AValue: TGameSystem);
     40    procedure Translate;
    3841  public
    3942    property GameSystem: TGameSystem read FGameSystem write SetGameSystem;
     
    4750{$R *.lfm}
    4851
     52uses
     53  MapType;
     54
    4955resourcestring
    5056  SFileDialogFilter = 'xTactics game system (.xts)|*.xts|All files|*.*';
     57
    5158
    5259{ TFormGameSystem }
     
    8895  FormBuildingKinds.Align := alClient;
    8996  FormBuildingKinds.Visible := True;
     97  Translate;
    9098end;
    9199
     
    114122end;
    115123
     124procedure TFormGameSystem.Translate;
     125var
     126  LastIndex: Integer;
     127begin
     128  with ComboBoxPreferredGridType do begin
     129    LastIndex := ItemIndex;
     130    Clear;
     131    Items.AddObject(SGridTypeNone, TObject(mtNone));
     132    Items.AddObject(SGridTypeHexagonVertical, TObject(mtHexagonVertical));
     133    Items.AddObject(SGridTypeHexagonHorizontal, TObject(mtHexagonHorizontal));
     134    Items.AddObject(SGridTypeSquare, TObject(mtSquare));
     135    Items.AddObject(SGridTypeTriangle, TObject(mtTriangle));
     136    Items.AddObject(SGridTypeRandom, TObject(mtRandom));
     137    Items.AddObject(SGridTypeIsometric, TObject(mtIsometric));
     138    ItemIndex := LastIndex;
     139  end;
     140end;
     141
    116142procedure TFormGameSystem.LoadData(GameSystem: TGameSystem);
    117143begin
     
    120146  CheckBoxUnitsSplitMerge.Checked := GameSystem.UnitsSplitMerge;
    121147  CheckBoxUnitsMoveImmediately.Checked := GameSystem.UnitsMoveImmediately;
     148  ComboBoxPreferredGridType.ItemIndex := Integer(GameSystem.PreferedMapType);
    122149  FormNations.UpdateList;
    123150  FormNations.UpdateInterface;
     
    134161  GameSystem.UnitsSplitMerge := CheckBoxUnitsSplitMerge.Checked;
    135162  GameSystem.UnitsMoveImmediately := CheckBoxUnitsMoveImmediately.Checked;
     163  GameSystem.PreferedMapType := TMapType(ComboBoxPreferredGridType.ItemIndex);
    136164end;
    137165
  • trunk/Forms/FormNew.lfm

    r325 r330  
    2020    Top = 60
    2121    Width = 691
    22     ActivePage = TabSheetRules
     22    ActivePage = TabSheetMap
    2323    Align = alClient
    2424    BorderSpacing.Around = 4
    2525    ParentFont = False
    26     TabIndex = 3
     26    TabIndex = 2
    2727    TabOrder = 0
    2828    OnChange = PageControl1Change
    2929    object TabSheetMode: TTabSheet
    3030      Caption = 'Mode'
    31       ClientHeight = 637
    32       ClientWidth = 681
     31      ClientHeight = 639
     32      ClientWidth = 683
    3333      ParentFont = False
    3434      object Panel3: TPanel
    3535        Left = 0
    36         Height = 637
     36        Height = 639
    3737        Top = 0
    38         Width = 681
     38        Width = 683
    3939        Align = alClient
    4040        BevelOuter = bvNone
    41         ClientHeight = 637
    42         ClientWidth = 681
     41        ClientHeight = 639
     42        ClientWidth = 683
    4343        ParentFont = False
    4444        TabOrder = 0
    4545        object RadioButtonModeLocal: TRadioButton
    4646          Left = 10
    47           Height = 30
     47          Height = 29
    4848          Top = 14
    49           Width = 70
     49          Width = 65
    5050          Caption = 'Local'
    5151          Checked = True
     
    5757        object RadioButtonModeNetworkServer: TRadioButton
    5858          Left = 10
    59           Height = 30
     59          Height = 29
    6060          Top = 48
    61           Width = 155
     61          Width = 144
    6262          Caption = 'Network server'
    6363          ParentFont = False
     
    6767        object RadioButtonModeNetworkClient: TRadioButton
    6868          Left = 10
    69           Height = 30
     69          Height = 29
    7070          Top = 160
    71           Width = 149
     71          Width = 138
    7272          Caption = 'Network client'
    7373          ParentFont = False
     
    7777        object EditServerAddress: TEdit
    7878          Left = 24
    79           Height = 43
     79          Height = 33
    8080          Top = 112
    8181          Width = 220
     
    8585        object SpinEditServerPort: TSpinEdit
    8686          Left = 256
    87           Height = 43
     87          Height = 33
    8888          Top = 112
    8989          Width = 79
     
    9494        object Label11: TLabel
    9595          Left = 256
    96           Height = 26
     96          Height = 25
    9797          Top = 80
    98           Width = 40
     98          Width = 36
    9999          Caption = 'Port:'
    100100          ParentColor = False
     
    103103        object Label12: TLabel
    104104          Left = 24
    105           Height = 26
     105          Height = 25
    106106          Top = 80
    107           Width = 74
     107          Width = 69
    108108          Caption = 'Address:'
    109109          ParentColor = False
     
    112112        object ListViewServers: TListView
    113113          Left = 26
    114           Height = 384
     114          Height = 386
    115115          Top = 200
    116116          Width = 334
     
    141141          Left = 26
    142142          Height = 38
    143           Top = 592
     143          Top = 594
    144144          Width = 94
    145145          Action = AServerAdd
     
    151151          Left = 248
    152152          Height = 38
    153           Top = 592
     153          Top = 594
    154154          Width = 94
    155155          Action = AServerRemove
     
    161161          Left = 136
    162162          Height = 38
    163           Top = 592
     163          Top = 594
    164164          Width = 94
    165165          Action = AServerModify
     
    172172    object TabSheetPlayers: TTabSheet
    173173      Caption = 'Players'
    174       ClientHeight = 637
    175       ClientWidth = 681
     174      ClientHeight = 639
     175      ClientWidth = 683
    176176      ParentFont = False
    177177      object Panel2: TPanel
    178178        Left = 0
    179         Height = 637
     179        Height = 639
    180180        Top = 0
    181         Width = 681
     181        Width = 683
    182182        Align = alClient
    183183        BevelOuter = bvNone
     
    188188    object TabSheetMap: TTabSheet
    189189      Caption = 'Map'
    190       ClientHeight = 637
    191       ClientWidth = 681
     190      ClientHeight = 639
     191      ClientWidth = 683
    192192      OnShow = TabSheetMapShow
    193193      ParentFont = False
    194194      object Panel1: TPanel
    195195        Left = 0
    196         Height = 637
     196        Height = 639
    197197        Top = 0
    198         Width = 681
     198        Width = 683
    199199        Align = alClient
    200200        BevelOuter = bvNone
    201         ClientHeight = 637
    202         ClientWidth = 681
     201        ClientHeight = 639
     202        ClientWidth = 683
    203203        ParentFont = False
    204204        TabOrder = 0
    205205        object Label1: TLabel
    206206          Left = 8
    207           Height = 26
     207          Height = 25
    208208          Top = 10
    209           Width = 94
     209          Width = 89
    210210          Caption = 'Map width:'
    211211          ParentColor = False
     
    214214        object Label2: TLabel
    215215          Left = 8
    216           Height = 26
     216          Height = 25
    217217          Top = 58
    218           Width = 101
     218          Width = 95
    219219          Caption = 'Map height:'
    220220          ParentColor = False
     
    223223        object SpinEditMapSizeX: TSpinEdit
    224224          Left = 128
    225           Height = 43
     225          Height = 33
    226226          Top = 4
    227227          Width = 98
     
    234234        object SpinEditMapSizeY: TSpinEdit
    235235          Left = 128
    236           Height = 43
     236          Height = 33
    237237          Top = 55
    238238          Width = 98
     
    247247          Height = 58
    248248          Top = 8
    249           Width = 430
     249          Width = 432
    250250          Max = 100
    251251          Min = 2
     
    261261          Height = 58
    262262          Top = 49
    263           Width = 430
     263          Width = 432
    264264          Max = 100
    265265          Min = 2
     
    273273        object Label5: TLabel
    274274          Left = 8
    275           Height = 26
     275          Height = 25
    276276          Top = 104
    277           Width = 82
     277          Width = 77
    278278          Caption = 'Grid type:'
    279279          ParentColor = False
     
    282282        object ComboBoxGridType: TComboBox
    283283          Left = 146
    284           Height = 38
     284          Height = 33
    285285          Top = 104
    286286          Width = 304
    287           ItemHeight = 0
     287          ItemHeight = 25
    288288          Items.Strings = (
    289             'Hexagonal'
     289            'Hexagon vertical'
    290290            'Square'
    291291            'Triangular'
    292292            'Random'
    293293            'Isometric'
     294            'Hexagon horizontal'
    294295          )
    295296          ParentFont = False
     
    300301        object ComboBoxMapShape: TComboBox
    301302          Left = 146
    302           Height = 38
     303          Height = 33
    303304          Top = 144
    304305          Width = 304
    305           ItemHeight = 0
     306          ItemHeight = 25
    306307          Items.Strings = (
    307308            'Hexagonal'
     
    316317        object Label8: TLabel
    317318          Left = 8
    318           Height = 26
     319          Height = 25
    319320          Top = 144
    320           Width = 98
     321          Width = 92
    321322          Caption = 'Map shape:'
    322323          ParentColor = False
     
    325326        object CheckBoxSymetricMap: TCheckBox
    326327          Left = 8
    327           Height = 26
     328          Height = 29
    328329          Top = 248
    329           Width = 430
    330           Anchors = [akTop, akLeft, akRight]
    331           AutoSize = False
     330          Width = 134
    332331          Caption = 'Symetric map'
    333332          ParentFont = False
     
    337336        object SpinEditVoidPercent: TSpinEdit
    338337          Left = 216
    339           Height = 43
     338          Height = 33
    340339          Top = 314
    341340          Width = 106
     
    348347        object CheckBoxVoid: TCheckBox
    349348          Left = 8
    350           Height = 30
    351           Top = 324
    352           Width = 189
     349          Height = 29
     350          Top = 318
     351          Width = 172
    353352          Caption = 'Inaccessible places'
    354353          ParentFont = False
     
    358357        object CheckBoxCity: TCheckBox
    359358          Left = 8
    360           Height = 30
     359          Height = 29
    361360          Top = 368
    362           Width = 72
     361          Width = 67
    363362          Caption = 'Cities'
    364363          ParentFont = False
     
    368367        object SpinEditCityPercent: TSpinEdit
    369368          Left = 216
    370           Height = 43
     369          Height = 33
    371370          Top = 360
    372371          Width = 106
     
    379378        object Label4: TLabel
    380379          Left = 331
    381           Height = 26
     380          Height = 25
    382381          Top = 368
    383382          Width = 15
     
    388387        object Label3: TLabel
    389388          Left = 331
    390           Height = 26
     389          Height = 25
    391390          Top = 324
    392391          Width = 15
     
    397396        object SpinEditNeutralUnits: TSpinEdit
    398397          Left = 312
    399           Height = 43
     398          Height = 33
    400399          Top = 488
    401400          Width = 98
     
    408407        object Label7: TLabel
    409408          Left = 8
    410           Height = 26
     409          Height = 25
    411410          Top = 496
    412           Width = 225
     411          Width = 207
    413412          Caption = 'Max random neutral units:'
    414413          ParentColor = False
     
    417416        object EditImageFile: TEdit
    418417          Left = 144
    419           Height = 43
     418          Height = 33
    420419          Top = 184
    421           Width = 413
     420          Width = 415
    422421          Anchors = [akTop, akLeft, akRight]
    423422          ParentFont = False
     
    426425        end
    427426        object ButtonImageBrowse: TButton
    428           Left = 566
     427          Left = 568
    429428          Height = 38
    430           Top = 190
     429          Top = 182
    431430          Width = 98
    432431          Anchors = [akTop, akRight]
     
    438437        object Label9: TLabel
    439438          Left = 8
    440           Height = 26
    441           Top = 191
    442           Width = 90
     439          Height = 25
     440          Top = 184
     441          Width = 82
    443442          Caption = 'Image file:'
    444443          ParentColor = False
     
    447446        object CheckBoxBridges: TCheckBox
    448447          Left = 8
    449           Height = 30
     448          Height = 29
    450449          Top = 408
    451           Width = 211
     450          Width = 194
    452451          Caption = 'Bridges between cells'
    453452          ParentFont = False
     
    457456        object SpinEditMaxPower: TSpinEdit
    458457          Left = 312
    459           Height = 43
     458          Height = 33
    460459          Top = 440
    461460          Width = 98
     
    469468        object Label10: TLabel
    470469          Left = 8
    471           Height = 26
     470          Height = 25
    472471          Top = 448
    473           Width = 155
     472          Width = 141
    474473          Caption = 'Max units per cell:'
    475474          ParentColor = False
     
    478477        object CheckBoxCyclicMap: TCheckBox
    479478          Left = 8
    480           Height = 26
     479          Height = 29
    481480          Top = 283
    482           Width = 430
    483           Anchors = [akTop, akLeft, akRight]
    484           AutoSize = False
     481          Width = 110
    485482          Caption = 'Cyclic map'
    486483          ParentFont = False
     
    492489          Height = 316
    493490          Top = 272
    494           Width = 429
     491          Width = 255
    495492          Anchors = [akTop, akLeft, akRight]
    496493          OnResize = Image1Resize
     
    498495        object Label15: TLabel
    499496          Left = 419
    500           Height = 26
     497          Height = 25
    501498          Top = 240
    502           Width = 71
     499          Width = 64
    503500          Caption = 'Preview:'
    504501          ParentColor = False
     
    519516    object TabSheetRules: TTabSheet
    520517      Caption = 'Rules'
    521       ClientHeight = 637
    522       ClientWidth = 681
     518      ClientHeight = 639
     519      ClientWidth = 683
    523520      ParentFont = False
    524521      object Panel4: TPanel
    525522        Left = 0
    526         Height = 637
     523        Height = 639
    527524        Top = 0
    528         Width = 681
     525        Width = 683
    529526        Align = alClient
    530527        BevelOuter = bvNone
    531         ClientHeight = 637
    532         ClientWidth = 681
     528        ClientHeight = 639
     529        ClientWidth = 683
    533530        ParentFont = False
    534531        TabOrder = 0
    535532        object RadioGroupGrowCells: TRadioGroup
    536533          Left = 14
    537           Height = 106
    538           Top = 104
     534          Height = 128
     535          Top = 120
    539536          Width = 312
    540537          AutoFill = True
     
    547544          ChildSizing.Layout = cclLeftToRightThenTopToBottom
    548545          ChildSizing.ControlsPerLine = 1
    549           ClientHeight = 79
    550           ClientWidth = 310
     546          ClientHeight = 98
     547          ClientWidth = 308
    551548          Items.Strings = (
    552549            'None'
     
    559556        object Label6: TLabel
    560557          Left = 8
    561           Height = 26
    562           Top = 248
    563           Width = 119
     558          Height = 25
     559          Top = 267
     560          Width = 111
    564561          Caption = 'Win objective:'
    565562          ParentColor = False
     
    567564        end
    568565        object ComboBoxWinObjective: TComboBox
    569           Left = 224
    570           Height = 38
    571           Top = 244
     566          Left = 216
     567          Height = 33
     568          Top = 267
    572569          Width = 328
    573           ItemHeight = 0
     570          ItemHeight = 25
    574571          Items.Strings = (
    575572            'Defeat all oponents'
     
    585582        object RadioGroupGrowAmount: TRadioGroup
    586583          Left = 14
    587           Height = 76
     584          Height = 92
    588585          Top = 16
    589586          Width = 305
     
    597594          ChildSizing.Layout = cclLeftToRightThenTopToBottom
    598595          ChildSizing.ControlsPerLine = 1
    599           ClientHeight = 49
    600           ClientWidth = 303
     596          ClientHeight = 62
     597          ClientWidth = 301
    601598          Items.Strings = (
    602599            'By one'
     
    608605        object CheckBoxFogOfWar: TCheckBox
    609606          Left = 336
    610           Height = 30
     607          Height = 29
    611608          Top = 24
    612           Width = 115
     609          Width = 111
    613610          Caption = 'Fog of war'
    614611          ParentFont = False
     
    617614        object PageControlWinObjective: TPageControl
    618615          Left = 12
    619           Height = 78
    620           Top = 290
    621           Width = 658
     616          Height = 110
     617          Top = 314
     618          Width = 660
    622619          ActivePage = TabSheetCaptureEntireMap
    623620          Anchors = [akTop, akLeft, akRight]
     
    633630          end
    634631          object TabSheetCaptureCells: TTabSheet
    635             ClientHeight = 74
    636             ClientWidth = 648
     632            ClientHeight = 102
     633            ClientWidth = 652
    637634            ParentFont = False
    638635            object Label14: TLabel
    639636              Left = 8
    640               Height = 26
     637              Height = 25
    641638              Top = 16
    642               Width = 161
     639              Width = 147
    643640              Caption = 'Special cells count:'
    644641              ParentColor = False
     
    647644            object SpinEditSpecialCells: TSpinEdit
    648645              Left = 236
    649               Height = 43
     646              Height = 33
    650647              Top = 8
    651648              Width = 158
     
    658655          end
    659656          object TabSheetStayAliveTurns: TTabSheet
    660             ClientHeight = 74
    661             ClientWidth = 648
     657            ClientHeight = 102
     658            ClientWidth = 652
    662659            ParentFont = False
    663660            object Label13: TLabel
    664661              Left = 8
    665               Height = 26
     662              Height = 25
    666663              Top = 16
    667               Width = 146
     664              Width = 136
    668665              Caption = 'Number of turns:'
    669666              ParentColor = False
     
    672669            object SpinEditTurns: TSpinEdit
    673670              Left = 236
    674               Height = 43
     671              Height = 33
    675672              Top = 8
    676673              Width = 158
     
    704701    TabOrder = 1
    705702    object ButtonOk: TButton
    706       Left = 981
     703      Left = 976
    707704      Height = 38
    708705      Top = 8
     
    758755    object Label16: TLabel
    759756      Left = 12
    760       Height = 26
    761       Top = 16
    762       Width = 120
     757      Height = 25
     758      Top = 14
     759      Width = 111
    763760      Caption = 'Game system:'
    764761      ParentColor = False
     
    767764    object ComboBoxGameSystem: TComboBox
    768765      Left = 176
    769       Height = 42
    770       Top = 10
     766      Height = 33
     767      Top = 12
    771768      Width = 254
    772       ItemHeight = 0
     769      ItemHeight = 25
    773770      ParentFont = False
    774771      Style = csDropDownList
     
    779776      Left = 443
    780777      Height = 38
    781       Top = 12
     778      Top = 10
    782779      Width = 113
    783780      Caption = 'Manage'
  • trunk/Forms/FormNew.pas

    r317 r330  
    397397  Client.View.ZoomAll;
    398398  //Client.ControlPlayer := GamePreview.Players.First;
    399   Client.CellGridVisible := True;
     399  Client.CellGridVisible := Core.Core.CellGridVisible;
     400  Client.UnitShapeVisible := Core.Core.UnitShapeVisible;
    400401  Bitmap.Canvas.Brush.Color := MapBackgroundColor; //clBackground; //PaintBox1.GetColorResolvingParent;
    401402  Bitmap.Canvas.FillRect(0, 0, Bitmap.Width, Bitmap.Height);
  • trunk/Languages/xtactics.cs.po

    r326 r330  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "X-Generator: Poedit 3.4.2\n"
     12"X-Generator: Poedit 3.3.1\n"
    1313
    1414#: building.sbonusattack
     
    413413msgstr "Izometrická"
    414414
     415#: maptype.sgridtypenone
     416msgctxt "maptype.sgridtypenone"
     417msgid "None"
     418msgstr "Žádný"
     419
    415420#: maptype.sgridtyperandom
    416421msgctxt "maptype.sgridtyperandom"
     
    720725msgstr "Jednotky lze rozdělit a sloučit"
    721726
     727#: tformgamesystem.label5.caption
     728msgid "Preferred grid type:"
     729msgstr "Preferovaný typ mřížky:"
     730
    722731#: tformgamesystem.tabsheetbuildings.caption
    723732msgid "Buildings"
  • trunk/Languages/xtactics.pot

    r326 r330  
    395395msgstr ""
    396396
     397#: maptype.sgridtypenone
     398msgctxt "maptype.sgridtypenone"
     399msgid "None"
     400msgstr ""
     401
    397402#: maptype.sgridtyperandom
    398403msgctxt "maptype.sgridtyperandom"
     
    696701msgstr ""
    697702
     703#: tformgamesystem.label5.caption
     704msgid "Preferred grid type:"
     705msgstr ""
     706
    698707#: tformgamesystem.tabsheetbuildings.caption
    699708msgid "Buildings"
  • trunk/Map.pas

    r322 r330  
    663663  for C := 0 to (Cells.Count div 2) - 1 do begin
    664664    Cells[C].Terrain := Cells[Cells.Count - 1 - C].Terrain;
    665     Cells[C].OneUnit.Power := Cells[Cells.Count - 1 - C].OneUnit.Power;
     665
     666    // Sync units
     667    if not Assigned(Cells[C].OneUnit) and Assigned(Cells[Cells.Count - 1 - C].OneUnit) then begin
     668      Cells[C].OneUnit := TGame(Game).Units.AddNew(Cells[Cells.Count - 1 - C].OneUnit.Kind,
     669        Cells[Cells.Count - 1 - C].OneUnit.Power);
     670    end;
     671    if Assigned(Cells[C].OneUnit) and Assigned(Cells[Cells.Count - 1 - C].OneUnit) then
     672      Cells[C].OneUnit.Power := Cells[Cells.Count - 1 - C].OneUnit.Power;
     673
     674    if Assigned(Cells[C].OneUnit) and not Assigned(Cells[Cells.Count - 1 - C].OneUnit) then begin
     675      TGame(Game).Units.Remove(Cells[C].OneUnit);
     676    end;
    666677
    667678    for I := Cells[C].Links.Count - 1 downto 0 do begin
  • trunk/MapType.pas

    r317 r330  
    102102
    103103resourcestring
     104  SGridTypeNone = 'None';
    104105  SGridTypeHexagonVertical = 'Hexagonal vertical';
    105106  SGridTypeHexagonHorizontal = 'Hexagonal horizontal';
Note: See TracChangeset for help on using the changeset viewer.