Changeset 179


Ignore:
Timestamp:
Feb 6, 2018, 3:47:23 PM (7 years ago)
Author:
chronos
Message:
  • Added: A preparation for gameplay over network.
Location:
trunk
Files:
4 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.lfm

    r155 r179  
    11object FormNew: TFormNew
    2   Left = 1176
    3   Height = 501
    4   Top = 331
    5   Width = 677
     2  Left = 596
     3  Height = 617
     4  Top = 243
     5  Width = 775
    66  Caption = 'New game'
    7   ClientHeight = 501
    8   ClientWidth = 677
     7  ClientHeight = 617
     8  ClientWidth = 775
    99  Constraints.MinHeight = 501
    1010  Constraints.MinWidth = 667
     11  DesignTimePPI = 120
     12  OnClose = FormClose
    1113  OnCreate = FormCreate
    1214  OnDestroy = FormDestroy
    1315  OnShow = FormShow
    1416  Position = poMainFormCenter
    15   LCLVersion = '1.8.0.4'
    16   object ButtonCancel: TButton
    17     Left = 454
    18     Height = 25
    19     Top = 459
    20     Width = 75
    21     Anchors = [akRight, akBottom]
    22     Caption = 'Cancel'
    23     ModalResult = 2
    24     TabOrder = 0
    25   end
    26   object ButtonOk: TButton
    27     Left = 558
    28     Height = 25
    29     Top = 459
    30     Width = 75
    31     Anchors = [akRight, akBottom]
    32     Caption = 'Ok'
    33     ModalResult = 1
    34     TabOrder = 1
    35   end
     17  LCLVersion = '1.8.0.6'
    3618  object PageControl1: TPageControl
    3719    Left = 4
    38     Height = 439
     20    Height = 330
    3921    Top = 4
    40     Width = 669
    41     ActivePage = TabSheet2
    42     Align = alTop
    43     Anchors = [akTop, akLeft, akRight, akBottom]
     22    Width = 767
     23    ActivePage = TabSheetMode
     24    Align = alClient
    4425    BorderSpacing.Around = 4
    45     TabIndex = 1
    46     TabOrder = 2
     26    TabIndex = 0
     27    TabOrder = 0
     28    object TabSheetMode: TTabSheet
     29      Caption = 'Mode'
     30      ClientHeight = 297
     31      ClientWidth = 759
     32      object RadioButtonModeLocal: TRadioButton
     33        Left = 10
     34        Height = 24
     35        Top = 14
     36        Width = 59
     37        Caption = 'Local'
     38        OnChange = RadioButtonModeLocalChange
     39        TabOrder = 0
     40      end
     41      object RadioButtonModeNetworkServer: TRadioButton
     42        Left = 10
     43        Height = 24
     44        Top = 48
     45        Width = 123
     46        Caption = 'Network server'
     47        OnChange = RadioButtonModeLocalChange
     48        TabOrder = 1
     49      end
     50      object RadioButtonModeNetworkClient: TRadioButton
     51        Left = 10
     52        Height = 24
     53        Top = 152
     54        Width = 120
     55        Caption = 'Network client'
     56        OnChange = RadioButtonModeLocalChange
     57        TabOrder = 2
     58      end
     59      object EditServerAddress: TEdit
     60        Left = 24
     61        Height = 28
     62        Top = 112
     63        Width = 220
     64        TabOrder = 3
     65      end
     66      object SpinEditServerPort: TSpinEdit
     67        Left = 256
     68        Height = 28
     69        Top = 112
     70        Width = 79
     71        MaxValue = 65535
     72        TabOrder = 4
     73      end
     74      object Label11: TLabel
     75        Left = 256
     76        Height = 20
     77        Top = 88
     78        Width = 30
     79        Caption = 'Port:'
     80        ParentColor = False
     81      end
     82      object Label12: TLabel
     83        Left = 24
     84        Height = 20
     85        Top = 88
     86        Width = 56
     87        Caption = 'Address:'
     88        ParentColor = False
     89      end
     90      object ListViewServers: TListView
     91        Left = 26
     92        Height = 97
     93        Top = 181
     94        Width = 326
     95        Anchors = [akTop, akLeft, akBottom]
     96        Columns = <       
     97          item
     98            Caption = 'Name'
     99            Width = 100
     100          end       
     101          item
     102            Caption = 'Address'
     103            Width = 200
     104          end>
     105        TabOrder = 5
     106        ViewStyle = vsReport
     107      end
     108    end
    47109    object TabSheet1: TTabSheet
    48110      Caption = 'Players'
    49       ClientHeight = 395
    50       ClientWidth = 663
    51       object ListView1: TListView
     111      ClientHeight = 297
     112      ClientWidth = 759
     113      object ListViewPlayers: TListView
    52114        Left = 4
    53         Height = 345
     115        Height = 247
    54116        Top = 4
    55         Width = 655
     117        Width = 751
    56118        Align = alTop
    57119        Anchors = [akTop, akLeft, akRight, akBottom]
     
    80142        TabOrder = 0
    81143        ViewStyle = vsReport
    82         OnCustomDrawSubItem = ListView1CustomDrawSubItem
    83         OnData = ListView1Data
    84         OnDblClick = ListView1DblClick
    85         OnKeyPress = ListView1KeyPress
    86         OnKeyUp = ListView1KeyUp
    87         OnSelectItem = ListView1SelectItem
     144        OnCustomDrawSubItem = ListViewPlayersCustomDrawSubItem
     145        OnData = ListViewPlayersData
     146        OnDblClick = ListViewPlayersDblClick
     147        OnKeyPress = ListViewPlayersKeyPress
     148        OnKeyUp = ListViewPlayersKeyUp
     149        OnSelectItem = ListViewPlayersSelectItem
    88150      end
    89151      object ButtonPlayerRemove: TButton
    90152        Left = 224
    91153        Height = 25
    92         Top = 357
     154        Top = 259
    93155        Width = 83
    94156        Action = APlayerRemove
     
    99161        Left = 16
    100162        Height = 25
    101         Top = 357
     163        Top = 259
    102164        Width = 83
    103165        Action = APlayerAdd
     
    108170        Left = 120
    109171        Height = 25
    110         Top = 357
     172        Top = 259
    111173        Width = 83
    112174        Action = APlayerModify
     
    118180    object TabSheet2: TTabSheet
    119181      Caption = 'Map'
    120       ClientHeight = 395
    121       ClientWidth = 663
     182      ClientHeight = 297
     183      ClientWidth = 759
    122184      object Label1: TLabel
    123185        Left = 8
    124         Height = 26
     186        Height = 20
    125187        Top = 9
    126         Width = 95
     188        Width = 74
    127189        Caption = 'Map width:'
    128190        ParentColor = False
     
    130192      object Label2: TLabel
    131193        Left = 8
    132         Height = 26
     194        Height = 20
    133195        Top = 57
    134         Width = 102
     196        Width = 79
    135197        Caption = 'Map height:'
    136198        ParentColor = False
     
    138200      object SpinEditMapSizeX: TSpinEdit
    139201        Left = 128
    140         Height = 36
     202        Height = 28
    141203        Top = 4
    142204        Width = 98
     
    148210      object SpinEditMapSizeY: TSpinEdit
    149211        Left = 128
    150         Height = 36
     212        Height = 28
    151213        Top = 55
    152214        Width = 98
     
    160222        Height = 47
    161223        Top = 8
    162         Width = 412
     224        Width = 508
    163225        Max = 100
    164226        Min = 2
     
    173235        Height = 47
    174236        Top = 49
    175         Width = 412
     237        Width = 508
    176238        Max = 100
    177239        Min = 2
     
    184246      object Label5: TLabel
    185247        Left = 8
    186         Height = 26
     248        Height = 20
    187249        Top = 104
    188         Width = 83
     250        Width = 64
    189251        Caption = 'Grid type:'
    190252        ParentColor = False
     
    192254      object ComboBoxGridType: TComboBox
    193255        Left = 146
    194         Height = 40
     256        Height = 28
    195257        Top = 104
    196258        Width = 208
    197         ItemHeight = 0
     259        ItemHeight = 20
    198260        Items.Strings = (
    199261          'Hexagonal'
     
    206268      object ComboBoxMapShape: TComboBox
    207269        Left = 146
    208         Height = 40
     270        Height = 28
    209271        Top = 144
    210272        Width = 208
    211         ItemHeight = 0
     273        ItemHeight = 20
    212274        Items.Strings = (
    213275          'Hexagonal'
     
    221283      object Label8: TLabel
    222284        Left = 8
    223         Height = 26
     285        Height = 20
    224286        Top = 144
    225         Width = 98
     287        Width = 76
    226288        Caption = 'Map shape:'
    227289        ParentColor = False
     
    231293        Height = 27
    232294        Top = 110
    233         Width = 175
     295        Width = 271
    234296        Anchors = [akTop, akLeft, akRight]
    235297        AutoSize = False
     
    239301      object SpinEditVoidPercent: TSpinEdit
    240302        Left = 216
    241         Height = 36
     303        Height = 28
    242304        Top = 224
    243305        Width = 106
     
    248310      object CheckBoxVoid: TCheckBox
    249311        Left = 8
    250         Height = 30
     312        Height = 24
    251313        Top = 232
    252         Width = 187
     314        Width = 149
    253315        Caption = 'Inaccessible places'
    254316        OnChange = CheckBoxVoidChange
     
    257319      object CheckBoxCity: TCheckBox
    258320        Left = 8
    259         Height = 30
     321        Height = 24
    260322        Top = 272
    261         Width = 71
     323        Width = 60
    262324        Caption = 'Cities'
    263325        OnChange = CheckBoxCityChange
     
    266328      object SpinEditCityPercent: TSpinEdit
    267329        Left = 216
    268         Height = 36
     330        Height = 28
    269331        Top = 272
    270332        Width = 106
     
    275337      object Label4: TLabel
    276338        Left = 331
    277         Height = 26
     339        Height = 20
    278340        Top = 272
    279         Width = 15
     341        Width = 12
    280342        Caption = '%'
    281343        ParentColor = False
     
    283345      object Label3: TLabel
    284346        Left = 331
    285         Height = 26
     347        Height = 20
    286348        Top = 232
    287         Width = 15
     349        Width = 12
    288350        Caption = '%'
    289351        ParentColor = False
     
    291353      object SpinEditNeutralUnits: TSpinEdit
    292354        Left = 408
    293         Height = 36
     355        Height = 28
    294356        Top = 352
    295357        Width = 98
     
    301363      object Label7: TLabel
    302364        Left = 8
    303         Height = 26
     365        Height = 20
    304366        Top = 352
    305         Width = 227
     367        Width = 172
    306368        Caption = 'Max random neutral units:'
    307369        ParentColor = False
     
    309371      object EditImageFile: TEdit
    310372        Left = 144
    311         Height = 36
     373        Height = 28
    312374        Top = 184
    313         Width = 396
     375        Width = 492
    314376        Anchors = [akTop, akLeft, akRight]
    315377        TabOrder = 12
    316378      end
    317379      object ButtonImageBrowse: TButton
    318         Left = 548
     380        Left = 644
    319381        Height = 25
    320382        Top = 192
     
    327389      object Label9: TLabel
    328390        Left = 8
    329         Height = 26
     391        Height = 20
    330392        Top = 184
    331         Width = 90
     393        Width = 70
    332394        Caption = 'Image file:'
    333395        ParentColor = False
     
    335397      object CheckBoxBridges: TCheckBox
    336398        Left = 8
    337         Height = 30
     399        Height = 24
    338400        Top = 310
    339         Width = 210
     401        Width = 168
    340402        Caption = 'Bridges between cells'
    341403        TabOrder = 14
     
    344406    object TabSheet3: TTabSheet
    345407      Caption = 'Rules'
    346       ClientHeight = 395
    347       ClientWidth = 663
     408      ClientHeight = 297
     409      ClientWidth = 759
    348410      object RadioGroupGrowCells: TRadioGroup
    349411        Left = 15
     
    360422        ChildSizing.Layout = cclLeftToRightThenTopToBottom
    361423        ChildSizing.ControlsPerLine = 1
    362         ClientHeight = 77
     424        ClientHeight = 80
    363425        ClientWidth = 308
    364426        Items.Strings = (
     
    371433      object Label6: TLabel
    372434        Left = 8
    373         Height = 25
     435        Height = 20
    374436        Top = 248
    375         Width = 111
     437        Width = 94
    376438        Caption = 'Win objective:'
    377439        ParentColor = False
     
    379441      object ComboBoxWinObjective: TComboBox
    380442        Left = 232
    381         Height = 33
     443        Height = 28
    382444        Top = 240
    383445        Width = 328
    384         ItemHeight = 0
     446        ItemHeight = 20
    385447        Items.Strings = (
    386448          'Defeat all oponents'
     
    406468        ChildSizing.Layout = cclLeftToRightThenTopToBottom
    407469        ChildSizing.ControlsPerLine = 1
    408         ClientHeight = 48
     470        ClientHeight = 51
    409471        ClientWidth = 301
    410472        Items.Strings = (
     
    418480        Height = 27
    419481        Top = 24
    420         Width = 503
     482        Width = 599
    421483        Anchors = [akTop, akLeft, akRight]
    422484        AutoSize = False
     
    425487      end
    426488    end
     489  end
     490  object PanelButtons: TPanel
     491    Left = 0
     492    Height = 45
     493    Top = 572
     494    Width = 775
     495    Align = alBottom
     496    BevelOuter = bvNone
     497    ClientHeight = 45
     498    ClientWidth = 775
     499    TabOrder = 1
     500    object ButtonOk: TButton
     501      Left = 587
     502      Height = 25
     503      Top = 6
     504      Width = 75
     505      Anchors = [akRight, akBottom]
     506      Caption = 'Ok'
     507      ModalResult = 1
     508      TabOrder = 0
     509    end
     510    object ButtonCancel: TButton
     511      Left = 691
     512      Height = 25
     513      Top = 6
     514      Width = 75
     515      Anchors = [akRight, akBottom]
     516      Caption = 'Cancel'
     517      ModalResult = 2
     518      TabOrder = 1
     519    end
     520  end
     521  object PanelChat: TPanel
     522    Left = 0
     523    Height = 228
     524    Top = 344
     525    Width = 775
     526    Align = alBottom
     527    BevelOuter = bvNone
     528    TabOrder = 2
     529  end
     530  object Splitter1: TSplitter
     531    Cursor = crVSplit
     532    Left = 0
     533    Height = 6
     534    Top = 338
     535    Width = 775
     536    Align = alBottom
     537    ResizeAnchor = akBottom
    427538  end
    428539  object ActionList1: TActionList
  • trunk/Forms/UFormNew.pas

    r170 r179  
    1818    APlayerModify: TAction;
    1919    ActionList1: TActionList;
     20    ButtonCancel: TButton;
    2021    ButtonImageBrowse: TButton;
    21     ButtonCancel: TButton;
    2222    ButtonOk: TButton;
    2323    ButtonPlayerAdd: TButton;
     
    3232    ComboBoxMapShape: TComboBox;
    3333    ComboBoxWinObjective: TComboBox;
     34    EditServerAddress: TEdit;
    3435    EditImageFile: TEdit;
    3536    Label1: TLabel;
     37    Label11: TLabel;
     38    Label12: TLabel;
    3639    Label2: TLabel;
    3740    Label3: TLabel;
     
    4245    Label8: TLabel;
    4346    Label9: TLabel;
    44     ListView1: TListView;
     47    ListViewPlayers: TListView;
     48    ListViewServers: TListView;
    4549    MenuItem1: TMenuItem;
    4650    MenuItem2: TMenuItem;
     
    4852    OpenPictureDialog1: TOpenPictureDialog;
    4953    PageControl1: TPageControl;
     54    PanelButtons: TPanel;
     55    PanelChat: TPanel;
    5056    PopupMenu1: TPopupMenu;
     57    RadioButtonModeNetworkServer: TRadioButton;
     58    RadioButtonModeNetworkClient: TRadioButton;
     59    RadioButtonModeLocal: TRadioButton;
    5160    RadioGroupGrowAmount: TRadioGroup;
    5261    RadioGroupGrowCells: TRadioGroup;
     62    SpinEditServerPort: TSpinEdit;
    5363    SpinEditCityPercent: TSpinEdit;
    5464    SpinEditMapSizeX: TSpinEdit;
     
    5666    SpinEditNeutralUnits: TSpinEdit;
    5767    SpinEditVoidPercent: TSpinEdit;
     68    Splitter1: TSplitter;
    5869    TabSheet1: TTabSheet;
    5970    TabSheet2: TTabSheet;
    6071    TabSheet3: TTabSheet;
     72    TabSheetMode: TTabSheet;
    6173    TrackBarSizeX: TTrackBar;
    6274    TrackBarSizeY: TTrackBar;
     
    6880    procedure CheckBoxVoidChange(Sender: TObject);
    6981    procedure ComboBoxMapShapeChange(Sender: TObject);
     82    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    7083    procedure FormCreate(Sender: TObject);
    7184    procedure FormDestroy(Sender: TObject);
    7285    procedure FormShow(Sender: TObject);
    73     procedure ListView1CustomDrawSubItem(Sender: TCustomListView;
     86    procedure ListViewPlayersCustomDrawSubItem(Sender: TCustomListView;
    7487      Item: TListItem; SubItem: Integer; State: TCustomDrawState;
    7588      var DefaultDraw: Boolean);
    76     procedure ListView1Data(Sender: TObject; Item: TListItem);
    77     procedure ListView1DblClick(Sender: TObject);
    78     procedure ListView1KeyPress(Sender: TObject; var Key: char);
    79     procedure ListView1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState
     89    procedure ListViewPlayersData(Sender: TObject; Item: TListItem);
     90    procedure ListViewPlayersDblClick(Sender: TObject);
     91    procedure ListViewPlayersKeyPress(Sender: TObject; var Key: char);
     92    procedure ListViewPlayersKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState
    8093      );
    81     procedure ListView1SelectItem(Sender: TObject; Item: TListItem;
     94    procedure ListViewPlayersSelectItem(Sender: TObject; Item: TListItem;
    8295      Selected: Boolean);
     96    procedure RadioButtonModeLocalChange(Sender: TObject);
    8397    procedure SpinEditMapSizeXChange(Sender: TObject);
    8498    procedure SpinEditMapSizeYChange(Sender: TObject);
     
    91105    procedure ReloadView;
    92106    procedure UpdateInterface;
    93     procedure Load(Game: TGame);
    94     procedure Save(Game: TGame);
     107    procedure Load(Server: TServer);
     108    procedure Save(Server: TServer);
    95109  end;
    96110
     
    103117
    104118uses
    105   UFormPlayer;
     119  UFormPlayer, UFormChat, UCore;
    106120
    107121resourcestring
     
    125139{ TFormNew }
    126140
    127 procedure TFormNew.ListView1Data(Sender: TObject; Item: TListItem);
     141procedure TFormNew.ListViewPlayersData(Sender: TObject; Item: TListItem);
    128142begin
    129143  if (Item.Index >= 0) and (Item.Index < Players.Count) then
     
    137151end;
    138152
    139 procedure TFormNew.ListView1DblClick(Sender: TObject);
     153procedure TFormNew.ListViewPlayersDblClick(Sender: TObject);
    140154begin
    141155  APlayerModify.Execute;
    142156end;
    143157
    144 procedure TFormNew.ListView1KeyPress(Sender: TObject; var Key: char);
     158procedure TFormNew.ListViewPlayersKeyPress(Sender: TObject; var Key: char);
    145159begin
    146160  if (Key = #13) then APlayerModify.Execute;
    147161end;
    148162
    149 procedure TFormNew.ListView1KeyUp(Sender: TObject; var Key: Word;
     163procedure TFormNew.ListViewPlayersKeyUp(Sender: TObject; var Key: Word;
    150164  Shift: TShiftState);
    151165begin
     
    154168end;
    155169
    156 procedure TFormNew.ListView1SelectItem(Sender: TObject; Item: TListItem;
     170procedure TFormNew.ListViewPlayersSelectItem(Sender: TObject; Item: TListItem;
    157171  Selected: Boolean);
    158172begin
    159173  ReloadView;
     174end;
     175
     176procedure TFormNew.RadioButtonModeLocalChange(Sender: TObject);
     177begin
     178  UpdateInterface;
    160179end;
    161180
     
    225244    ItemIndex := LastIndex;
    226245  end;
     246  Core.CoolTranslator1.TranslateComponentRecursive(Self);
    227247end;
    228248
    229249procedure TFormNew.ReloadView;
    230250begin
    231   ListView1.Items.Count := Players.Count;
    232   ListView1.Refresh;
     251  ListViewPlayers.Items.Count := Players.Count;
     252  ListViewPlayers.Refresh;
    233253  Translate;
    234254  UpdateInterface;
     
    237257procedure TFormNew.UpdateInterface;
    238258begin
    239   APlayerRemove.Enabled := Assigned(ListView1.Selected) and (Players.Count > 2);
     259  APlayerRemove.Enabled := Assigned(ListViewPlayers.Selected) and (Players.Count > 2);
    240260  APlayerAdd.Enabled := Players.Count < MaxPlayerCount;
    241   APlayerModify.Enabled := Assigned(ListView1.Selected);
     261  APlayerModify.Enabled := Assigned(ListViewPlayers.Selected);
    242262  EditImageFile.Enabled := ComboBoxMapShape.ItemIndex = Integer(msImage);
    243263  ButtonImageBrowse.Enabled := ComboBoxMapShape.ItemIndex = Integer(msImage);
     264  EditServerAddress.Enabled := RadioButtonModeNetworkServer.Checked;
     265  SpinEditServerPort.Enabled := RadioButtonModeNetworkServer.Checked;
     266  ListViewServers.Enabled := RadioButtonModeNetworkClient.Checked;
    244267end;
    245268
    246269procedure TFormNew.FormShow(Sender: TObject);
    247270begin
     271  Core.PersistentForm.Load(Self);
    248272  ReloadView;
    249273  //Height := Trunc(1.5 * Height);
     
    251275end;
    252276
    253 procedure TFormNew.ListView1CustomDrawSubItem(Sender: TCustomListView;
     277procedure TFormNew.ListViewPlayersCustomDrawSubItem(Sender: TCustomListView;
    254278  Item: TListItem; SubItem: Integer; State: TCustomDrawState;
    255279  var DefaultDraw: Boolean);
    256280begin
    257281  if SubItem = 2 then
    258   with ListView1.Canvas do begin
     282  with ListViewPlayers.Canvas do begin
    259283    Brush.Color := TPlayer(Item.Data).Color;
    260284    Brush.Style := bsSolid;
     
    266290begin
    267291  Players := TPlayers.Create;
     292  FormChat := TFormChat.Create(nil);
     293  FormChat.ManualDock(PanelChat, nil, alClient);
     294  FormChat.Align := alClient;
     295  FormChat.Show;
     296  Translate;
    268297end;
    269298
     
    283312end;
    284313
     314procedure TFormNew.FormClose(Sender: TObject; var CloseAction: TCloseAction);
     315begin
     316  Core.PersistentForm.Save(Self);
     317end;
     318
    285319procedure TFormNew.APlayerModifyExecute(Sender: TObject);
    286320begin
    287   if Assigned(ListView1.Selected) then begin
    288     FormPlayer.Load(TPlayer(ListView1.Selected.Data));
     321  if Assigned(ListViewPlayers.Selected) then begin
     322    FormPlayer.Load(TPlayer(ListViewPlayers.Selected.Data));
    289323    if FormPlayer.ShowModal = mrOk then begin
    290       FormPlayer.Save(TPlayer(ListView1.Selected.Data));
     324      FormPlayer.Save(TPlayer(ListViewPlayers.Selected.Data));
    291325      ReloadView;
    292326    end;
     
    296330procedure TFormNew.APlayerRemoveExecute(Sender: TObject);
    297331begin
    298   if Assigned(ListView1.Selected) then begin
    299     Players.Remove(ListView1.Selected.Data);
     332  if Assigned(ListViewPlayers.Selected) then begin
     333    Players.Remove(ListViewPlayers.Selected.Data);
    300334    ReloadView;
    301335  end;
     
    328362procedure TFormNew.FormDestroy(Sender: TObject);
    329363begin
    330   Players.Free;
    331 end;
    332 
    333 procedure TFormNew.Load(Game: TGame);
    334 begin
    335   CheckBoxSymetricMap.Checked := Game.SymetricMap;
    336   CheckBoxVoid.Checked := Game.VoidEnabled;
    337   SpinEditVoidPercent.Value := Game.VoidPercentage;
    338   SpinEditVoidPercent.Enabled := Game.VoidEnabled;
    339   Players.Assign(Game.PlayersSetting);
    340   CheckBoxCity.Checked := Game.CityEnabled;
    341   SpinEditCityPercent.Value := Game.CityPercentage;
    342   SpinEditMapSizeX.Value := Game.Map.Size.X;
    343   SpinEditMapSizeY.Value := Game.Map.Size.Y;
    344   TrackBarSizeX.Position := Game.Map.Size.X;
    345   TrackBarSizeY.Position := Game.Map.Size.Y;
    346   RadioGroupGrowAmount.ItemIndex := Integer(Game.GrowAmount);
    347   RadioGroupGrowCells.ItemIndex := Integer(Game.GrowCells);
    348   ComboBoxGridType.ItemIndex := Integer(Game.MapType) - 1;
    349   ComboBoxWinObjective.ItemIndex := Integer(Game.WinObjective);
    350   SpinEditNeutralUnits.Value := Game.MaxNeutralUnits;
    351   ComboBoxMapShape.ItemIndex := Integer(Game.Map.Shape);
    352   EditImageFile.Text := Game.MapImageFileName;
    353   CheckBoxFogOfWar.Checked := Game.FogOfWar;
    354   CheckBoxBridges.Checked := Game.BridgeEnabled;
    355 end;
    356 
    357 procedure TFormNew.Save(Game: TGame);
    358 begin
    359   Game.PlayersSetting.Assign(Players);
    360   Game.SymetricMap := CheckBoxSymetricMap.Checked;
    361   Game.VoidEnabled := CheckBoxVoid.Checked;
    362   Game.VoidPercentage := SpinEditVoidPercent.Value;
    363   Game.CityEnabled := CheckBoxCity.Checked;
    364   Game.CityPercentage := SpinEditCityPercent.Value;
    365   Game.Map.Size := TPoint.Create(SpinEditMapSizeX.Value, SpinEditMapSizeY.Value);
    366   Game.GrowAmount := TGrowAmount(RadioGroupGrowAmount.ItemIndex);
    367   Game.GrowCells := TGrowCells(RadioGroupGrowCells.ItemIndex);
    368   Game.MapType := TMapType(ComboBoxGridType.ItemIndex + 1);
    369   Game.WinObjective := TWinObjective(ComboBoxWinObjective.ItemIndex);
    370   Game.MaxNeutralUnits := SpinEditNeutralUnits.Value;
    371   Game.Map.Shape := TMapShape(ComboBoxMapShape.ItemIndex);
    372   Game.MapImageFileName := EditImageFile.Text;
    373   Game.FogOfWar := CheckBoxFogOfWar.Checked;
    374   Game.BridgeEnabled := CheckBoxBridges.Checked;
     364  FreeAndNil(Players);
     365  FreeAndNil(FormChat);
     366end;
     367
     368procedure TFormNew.Load(Server: TServer);
     369begin
     370  with Server do begin
     371    CheckBoxSymetricMap.Checked := Game.SymetricMap;
     372    CheckBoxVoid.Checked := Game.VoidEnabled;
     373    SpinEditVoidPercent.Value := Game.VoidPercentage;
     374    SpinEditVoidPercent.Enabled := Game.VoidEnabled;
     375    Players.Assign(Game.PlayersSetting);
     376    CheckBoxCity.Checked := Game.CityEnabled;
     377    SpinEditCityPercent.Value := Game.CityPercentage;
     378    SpinEditMapSizeX.Value := Game.Map.Size.X;
     379    SpinEditMapSizeY.Value := Game.Map.Size.Y;
     380    TrackBarSizeX.Position := Game.Map.Size.X;
     381    TrackBarSizeY.Position := Game.Map.Size.Y;
     382    RadioGroupGrowAmount.ItemIndex := Integer(Game.GrowAmount);
     383    RadioGroupGrowCells.ItemIndex := Integer(Game.GrowCells);
     384    ComboBoxGridType.ItemIndex := Integer(Game.MapType) - 1;
     385    ComboBoxWinObjective.ItemIndex := Integer(Game.WinObjective);
     386    SpinEditNeutralUnits.Value := Game.MaxNeutralUnits;
     387    ComboBoxMapShape.ItemIndex := Integer(Game.Map.Shape);
     388    EditImageFile.Text := Game.MapImageFileName;
     389    CheckBoxFogOfWar.Checked := Game.FogOfWar;
     390    CheckBoxBridges.Checked := Game.BridgeEnabled;
     391    RadioButtonModeLocal.Checked := Mode = smLocal;
     392    RadioButtonModeNetworkClient.Checked := Mode = smNetworkClient;
     393    RadioButtonModeNetworkServer.Checked := Mode = smNetworkServer;
     394    EditServerAddress.Text := LocalNetworkAddress;
     395    SpinEditServerPort.Value := LocalNetworkPort;
     396  end;
     397end;
     398
     399procedure TFormNew.Save(Server: TServer);
     400begin
     401  with Server do begin
     402    if RadioButtonModeLocal.Checked then Mode := smLocal
     403    else if RadioButtonModeNetworkClient.Checked then Mode := smNetworkClient
     404    else if RadioButtonModeNetworkServer.Checked then Mode := smNetworkServer;
     405    LocalNetworkAddress := EditServerAddress.Text;
     406    LocalNetworkPort := SpinEditServerPort.Value;
     407    Game.PlayersSetting.Assign(Players);
     408    Game.SymetricMap := CheckBoxSymetricMap.Checked;
     409    Game.VoidEnabled := CheckBoxVoid.Checked;
     410    Game.VoidPercentage := SpinEditVoidPercent.Value;
     411    Game.CityEnabled := CheckBoxCity.Checked;
     412    Game.CityPercentage := SpinEditCityPercent.Value;
     413    Game.Map.Size := TPoint.Create(SpinEditMapSizeX.Value, SpinEditMapSizeY.Value);
     414    Game.GrowAmount := TGrowAmount(RadioGroupGrowAmount.ItemIndex);
     415    Game.GrowCells := TGrowCells(RadioGroupGrowCells.ItemIndex);
     416    Game.MapType := TMapType(ComboBoxGridType.ItemIndex + 1);
     417    Game.WinObjective := TWinObjective(ComboBoxWinObjective.ItemIndex);
     418    Game.MaxNeutralUnits := SpinEditNeutralUnits.Value;
     419    Game.Map.Shape := TMapShape(ComboBoxMapShape.ItemIndex);
     420    Game.MapImageFileName := EditImageFile.Text;
     421    Game.FogOfWar := CheckBoxFogOfWar.Checked;
     422    Game.BridgeEnabled := CheckBoxBridges.Checked;
     423  end;
    375424end;
    376425
  • trunk/Languages/xtactics.cs.po

    r178 r179  
    99"MIME-Version: 1.0\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "X-Generator: Poedit 2.0.4\n"
     11"X-Generator: Poedit 1.8.8\n"
    1212"Language: cs\n"
    1313
     
    131131msgid "Occupied cells"
    132132msgstr "Obsazené buňky"
     133
     134#: tformchat.buttonmessagesend.caption
     135msgid "Send"
     136msgstr "Odeslat"
     137
     138#: tformchat.caption
     139msgid "Chat"
     140msgstr "Pokec"
     141
     142#: tformchat.label1.caption
     143msgid "Chat:"
     144msgstr "Pokec:"
    133145
    134146#: tformhelp.caption
     
    313325msgstr "Šířka mapy:"
    314326
     327#: tformnew.label11.caption
     328msgid "Port:"
     329msgstr "Port:"
     330
     331#: tformnew.label12.caption
     332msgid "Address:"
     333msgstr "Adresa:"
     334
    315335#: tformnew.label2.caption
    316336#| msgid "x"
     
    348368msgstr "Soubor obrázku:"
    349369
    350 #: tformnew.listview1.columns[0].caption
     370#: tformnew.listviewplayers.columns[0].caption
     371msgctxt "tformnew.listviewplayers.columns[0].caption"
    351372msgid "Name"
    352373msgstr "Jméno"
    353374
    354 #: tformnew.listview1.columns[1].caption
     375#: tformnew.listviewplayers.columns[1].caption
     376msgctxt "tformnew.listviewplayers.columns[1].caption"
    355377msgid "Type"
    356378msgstr "Typ"
    357379
    358 #: tformnew.listview1.columns[2].caption
     380#: tformnew.listviewplayers.columns[2].caption
     381msgctxt "tformnew.listviewplayers.columns[2].caption"
    359382msgid "Color"
    360383msgstr "Barva"
    361384
    362 #: tformnew.listview1.columns[3].caption
     385#: tformnew.listviewplayers.columns[3].caption
     386msgctxt "tformnew.listviewplayers.columns[3].caption"
    363387msgid "Start units"
    364388msgstr "Počátečních jednotek"
     389
     390#: tformnew.listviewservers.columns[0].caption
     391msgctxt "tformnew.listviewservers.columns[0].caption"
     392msgid "Name"
     393msgstr "Jméno"
     394
     395#: tformnew.listviewservers.columns[1].caption
     396msgctxt "tformnew.listviewservers.columns[1].caption"
     397msgid "Address"
     398msgstr "Adresa"
     399
     400#: tformnew.radiobuttonmodelocal.caption
     401msgid "Local"
     402msgstr "Místní"
     403
     404#: tformnew.radiobuttonmodenetworkclient.caption
     405msgctxt "tformnew.radiobuttonmodenetworkclient.caption"
     406msgid "Network client"
     407msgstr "Síťový klient"
     408
     409#: tformnew.radiobuttonmodenetworkserver.caption
     410msgctxt "tformnew.radiobuttonmodenetworkserver.caption"
     411msgid "Network server"
     412msgstr "Síťový server"
    365413
    366414#: tformnew.radiogroupgrowamount.caption
     
    383431msgid "Rules"
    384432msgstr "Pravidla"
     433
     434#: tformnew.tabsheetmode.caption
     435msgid "Mode"
     436msgstr "Režim"
    385437
    386438#: tformplayer.buttoncancel.caption
  • trunk/Languages/xtactics.po

    r178 r179  
    122122msgstr ""
    123123
     124#: tformchat.buttonmessagesend.caption
     125msgid "Send"
     126msgstr ""
     127
     128#: tformchat.caption
     129msgid "Chat"
     130msgstr ""
     131
     132#: tformchat.label1.caption
     133msgid "Chat:"
     134msgstr ""
     135
    124136#: tformhelp.caption
    125137msgctxt "TFORMHELP.CAPTION"
     
    299311msgstr ""
    300312
     313#: tformnew.label11.caption
     314msgid "Port:"
     315msgstr ""
     316
     317#: tformnew.label12.caption
     318msgid "Address:"
     319msgstr ""
     320
    301321#: tformnew.label2.caption
    302322msgid "Map height:"
     
    333353msgstr ""
    334354
    335 #: tformnew.listview1.columns[0].caption
     355#: tformnew.listviewplayers.columns[0].caption
     356msgctxt "tformnew.listviewplayers.columns[0].caption"
    336357msgid "Name"
    337358msgstr ""
    338359
    339 #: tformnew.listview1.columns[1].caption
     360#: tformnew.listviewplayers.columns[1].caption
     361msgctxt "tformnew.listviewplayers.columns[1].caption"
    340362msgid "Type"
    341363msgstr ""
    342364
    343 #: tformnew.listview1.columns[2].caption
     365#: tformnew.listviewplayers.columns[2].caption
     366msgctxt "tformnew.listviewplayers.columns[2].caption"
    344367msgid "Color"
    345368msgstr ""
    346369
    347 #: tformnew.listview1.columns[3].caption
     370#: tformnew.listviewplayers.columns[3].caption
     371msgctxt "tformnew.listviewplayers.columns[3].caption"
    348372msgid "Start units"
     373msgstr ""
     374
     375#: tformnew.listviewservers.columns[0].caption
     376msgctxt "tformnew.listviewservers.columns[0].caption"
     377msgid "Name"
     378msgstr ""
     379
     380#: tformnew.listviewservers.columns[1].caption
     381msgctxt "tformnew.listviewservers.columns[1].caption"
     382msgid "Address"
     383msgstr ""
     384
     385#: tformnew.radiobuttonmodelocal.caption
     386msgid "Local"
     387msgstr ""
     388
     389#: tformnew.radiobuttonmodenetworkclient.caption
     390msgctxt "tformnew.radiobuttonmodenetworkclient.caption"
     391msgid "Network client"
     392msgstr ""
     393
     394#: tformnew.radiobuttonmodenetworkserver.caption
     395msgctxt "tformnew.radiobuttonmodenetworkserver.caption"
     396msgid "Network server"
    349397msgstr ""
    350398
     
    367415#: tformnew.tabsheet3.caption
    368416msgid "Rules"
     417msgstr ""
     418
     419#: tformnew.tabsheetmode.caption
     420msgid "Mode"
    369421msgstr ""
    370422
  • trunk/UCore.lfm

    r178 r179  
    33  OnDestroy = DataModuleDestroy
    44  OldCreateOrder = False
    5   Height = 678
    6   HorizontalOffset = 706
    7   VerticalOffset = 352
    8   Width = 940
     5  Height = 848
     6  HorizontalOffset = 695
     7  VerticalOffset = 182
     8  Width = 1175
     9  PPI = 120
    910  object ActionList1: TActionList
    1011    Images = ImageListSmall
    11     left = 90
    12     top = 40
     12    left = 113
     13    top = 50
     14    object AExit: TAction
     15      Caption = 'Exit'
     16      Hint = 'Exit application'
     17      ImageIndex = 1
     18      OnExecute = AExitExecute
     19      ShortCut = 32883
     20    end
    1321    object AGameNew: TAction
    1422      Caption = 'New'
     
    1725      OnExecute = AGameNewExecute
    1826      ShortCut = 16462
    19     end
    20     object AExit: TAction
    21       Caption = 'Exit'
    22       Hint = 'Exit application'
    23       ImageIndex = 1
    24       OnExecute = AExitExecute
    25       ShortCut = 32883
    2627    end
    2728    object AGameEnd: TAction
     
    8485  end
    8586  object ImageListSmall: TImageList
    86     left = 524
    87     top = 280
     87    left = 655
     88    top = 350
    8889    Bitmap = {
    8990      4C690C00000010000000100000000000000000000000E3AA4BD6E5B35EFFE3B1
     
    477478    POFilesFolder = 'Languages'
    478479    OnTranslate = CoolTranslator1Translate
    479     left = 91
    480     top = 290
     480    left = 114
     481    top = 363
    481482  end
    482483  object ImageListLarge: TImageList
    483484    Height = 32
    484485    Width = 32
    485     left = 524
    486     top = 190
     486    left = 655
     487    top = 238
    487488    Bitmap = {
    488489      4C690C0000002000000020000000000000000000000000000000E2AA4B36E2A9
     
    20292030    RootName = 'CONFIG'
    20302031    ReadOnly = False
    2031     left = 91
    2032     top = 370
     2032    left = 114
     2033    top = 463
    20332034  end
    20342035  object OpenDialog1: TOpenDialog
    20352036    DefaultExt = '.xtmap'
    2036     left = 750
    2037     top = 194
     2037    left = 938
     2038    top = 243
    20382039  end
    20392040  object SaveDialog1: TSaveDialog
    20402041    DefaultExt = '.xtmap'
    2041     left = 750
    2042     top = 110
     2042    left = 938
     2043    top = 138
    20432044  end
    20442045  object ApplicationInfo: TApplicationInfo
     
    20572058    RegistryRoot = rrKeyCurrentUser
    20582059    License = 'CC0'
    2059     left = 91
    2060     top = 120
     2060    left = 114
     2061    top = 150
    20612062  end
    20622063  object PersistentForm: TPersistentForm
    20632064    MinVisiblePart = 50
    20642065    EntireVisible = False
    2065     left = 520
    2066     top = 400
     2066    left = 650
     2067    top = 500
    20672068  end
    20682069  object ScaleDPI1: TScaleDPI
    20692070    AutoDetect = False
    2070     left = 90
    2071     top = 450
     2071    left = 113
     2072    top = 563
    20722073  end
    20732074  object LastOpenedList1: TLastOpenedList
    20742075    MaxCount = 10
    20752076    OnChange = LastOpenedList1Change
    2076     left = 91
    2077     top = 200
     2077    left = 114
     2078    top = 250
    20782079  end
    20792080end
  • trunk/UCore.pas

    r178 r179  
    228228    if (DesignDPI.X <> DPI.X) or (DesignDPI.Y <> DPI.Y) then begin
    229229      //ApplyToAll(DesignDPI);
    230       FormNew.Show;
    231       FormNew.Hide;
    232230      for I := 0 to Screen.FormCount - 1 do
    233231      if (Screen.Forms[I].WindowState = wsNormal) or
     
    318316procedure TCore.AGameNewExecute(Sender: TObject);
    319317begin
    320   FormNew.Load(Game);
    321   if FormNew.ShowModal = mrOk then begin
    322     FormNew.Save(Game);
    323     StartNewGame;
     318  FormNew := TFormNew.Create(nil);
     319  try
     320    FormNew.Load(Server);
     321    if FormNew.ShowModal = mrOk then begin
     322      FormNew.Save(Server);
     323      StartNewGame;
     324    end;
     325  finally
     326    FormNew.Free;
    324327  end;
    325328end;
     
    361364      FormSettings.Save;
    362365      Game.SaveConfig(XMLConfig1, 'Game');
     366      Server.SaveConfig(XMLConfig1, 'Server');
    363367    end;
    364368  finally
     
    380384begin
    381385  UGame.InitStrings;
    382   FormNew.Translate;
    383386  FormPlayer.Translate;
    384387end;
     
    404407  FreeAndNil(StoredDimension);
    405408  Game.SaveConfig(XMLConfig1, 'Game');
     409  Server.SaveConfig(XMLConfig1, 'Server');
    406410  SaveConfig;
    407411  FreeAndNil(Server);
     
    478482    LoadConfig;
    479483    Game.LoadConfig(XMLConfig1, 'Game');
     484    Server.LoadConfig(XMLConfig1, 'Server');
    480485
    481486    CommandLineParams;
  • trunk/UGame.pas

    r176 r179  
    88  Classes, SysUtils, ExtCtrls, Graphics, XMLConf, XMLRead, XMLWrite,
    99  DOM, Math, LazFileUtils, UXMLUtils, Dialogs, Types, LCLType, LCLIntf, fgl,
    10   UGeometry;
     10  UGeometry, UGameSocket;
    1111
    1212const
     
    409409  end;
    410410
     411  TCommand = (cmdTextMessage);
     412  TReceiveEvent = procedure (Command: TCommand; DataIn, DataOut: Pointer);
     413  TCommandTextMessage = record
     414    Text: string;
     415  end;
     416
    411417  { TClient }
    412418
     
    415421    FGame: TGame;
    416422    FControlPlayer: TPlayer;
     423    FOnReceive: TReceiveEvent;
    417424    procedure SetControlPlayer(AValue: TPlayer);
    418425    procedure SetGame(AValue: TGame);
     
    420427    Name: string;
    421428    View: TView;
     429    GameSocket: TGameSocket;
     430    procedure Send(Command: TCommand; DataOut, DataIn: Pointer);
    422431    constructor Create;
    423432    destructor Destroy; override;
    424433    property ControlPlayer: TPlayer read FControlPlayer write SetControlPlayer;
    425434    property Game: TGame read FGame write SetGame;
     435    property OnReceive: TReceiveEvent read FOnReceive write FOnReceive;
    426436  end;
    427437
     
    512522  end;
    513523
     524  TServerMode = (smLocal, smNetworkServer, smNetworkClient);
     525
    514526  { TServer }
    515527
    516528  TServer = class
    517529  private
     530    FActive: Boolean;
    518531    FGame: TGame;
     532    FServerMode: TServerMode;
     533    procedure SetActive(AValue: Boolean);
    519534    procedure SetGame(AValue: TGame);
     535    procedure SetServerMode(AValue: TServerMode);
    520536  public
    521537    Clients: TClients;
     538    LocalNetworkAddress: string;
     539    LocalNetworkPort: Word;
     540    RemoteNetworkAddress: string;
     541    RemoteNetworkPort: Word;
     542    GameSocket: TGameSocket;
     543    procedure LoadConfig(Config: TXmlConfig; Path: string);
     544    procedure SaveConfig(Config: TXmlConfig; Path: string);
    522545    procedure InitClients;
    523546    procedure Clear;
     
    525548    destructor Destroy; override;
    526549    property Game: TGame read FGame write SetGame;
     550    property Mode: TServerMode read FServerMode write SetServerMode;
     551    property Active: Boolean read FActive write SetActive;
    527552  end;
    528553
     
    648673  FGame := AValue;
    649674  View.Game := AValue;
     675end;
     676
     677procedure TClient.Send(Command: TCommand; DataOut, DataIn: Pointer);
     678begin
    650679end;
    651680
     
    31313160end;
    31323161
     3162procedure TServer.SetActive(AValue: Boolean);
     3163begin
     3164  if FActive = AValue then Exit;
     3165  FActive := AValue;
     3166end;
     3167
     3168procedure TServer.SetServerMode(AValue: TServerMode);
     3169var
     3170  LastActiveState: Boolean;
     3171begin
     3172  if FServerMode = AValue then Exit;
     3173  LastActiveState := Active;
     3174  Active := False;
     3175  FServerMode := AValue;
     3176  FreeAndNil(GameSocket);
     3177  case FServerMode of
     3178    smLocal: GameSocket := TGameSocketDirect.Create;
     3179    smNetworkServer: begin
     3180      GameSocket := TGameSocketNetworkServer.Create;
     3181      TGameSocketNetworkServer(GameSocket).TCPServer.Address := LocalNetworkAddress;
     3182      TGameSocketNetworkServer(GameSocket).TCPServer.Port := LocalNetworkPort;
     3183      //TODO TGameSocketNetworkServer(GameSocket).TCPServer.Active := True;
     3184    end;
     3185    smNetworkClient: begin
     3186      GameSocket := TGameSocketNetworkClient.Create;
     3187      if (LocalNetworkAddress = RemoteNetworkAddress) and
     3188        (LocalNetworkPort = RemoteNetworkPort) then begin
     3189          // User wants to play on its own server
     3190          GameSocket := TGameSocketNetworkServer.Create;
     3191          TGameSocketNetworkServer(GameSocket).TCPServer.Address := LocalNetworkAddress;
     3192          TGameSocketNetworkServer(GameSocket).TCPServer.Port := LocalNetworkPort;
     3193          //TODO TGameSocketNetworkServer(GameSocket).TCPServer.Active := True;
     3194        end else
     3195        begin
     3196          // Do not create socket. User wants to connect elsewhere
     3197        end;
     3198      end;
     3199  end;
     3200  Active := LastActiveState;
     3201end;
     3202
     3203procedure TServer.LoadConfig(Config: TXmlConfig; Path: string);
     3204begin
     3205  with Config do begin
     3206    LocalNetworkAddress := string(GetValue(DOMString(Path + '/LocalNetworkAddress'), 'localhost'));
     3207    LocalNetworkPort := GetValue(DOMString(Path + '/LocalNetworkPort'), 40009);
     3208    RemoteNetworkAddress := string(GetValue(DOMString(Path + '/RemoteNetworkAddress'), 'localhost'));
     3209    RemoteNetworkPort := GetValue(DOMString(Path + '/RemoteNetworkPort'), 40009);
     3210    Mode := TServerMode(GetValue(DOMString(Path + '/Mode'), Integer(smLocal)));
     3211  end;
     3212end;
     3213
     3214procedure TServer.SaveConfig(Config: TXmlConfig; Path: string);
     3215begin
     3216  with Config do begin
     3217    SetValue(DOMString(Path + '/LocalNetworkAddress'), DOMString(LocalNetworkAddress));
     3218    SetValue(DOMString(Path + '/LocalNetworkPort'), LocalNetworkPort);
     3219    SetValue(DOMString(Path + '/RemoteNetworkAddress'), DOMString(RemoteNetworkAddress));
     3220    SetValue(DOMString(Path + '/RemoteNetworkPort'), RemoteNetworkPort);
     3221    SetValue(DOMString(Path + '/Mode'), Integer(Mode));
     3222  end;
     3223end;
     3224
    31333225procedure TServer.InitClients;
    31343226var
  • trunk/xtactics.lpi

    r177 r179  
    100100      </Item6>
    101101    </RequiredPackages>
    102     <Units Count="13">
     102    <Units Count="16">
    103103      <Unit0>
    104104        <Filename Value="xtactics.lpr"/>
     
    183183        <ResourceBaseClass Value="Form"/>
    184184      </Unit12>
     185      <Unit13>
     186        <Filename Value="Forms/UFormChat.pas"/>
     187        <IsPartOfProject Value="True"/>
     188        <ComponentName Value="FormChat"/>
     189        <HasResources Value="True"/>
     190        <ResourceBaseClass Value="Form"/>
     191      </Unit13>
     192      <Unit14>
     193        <Filename Value="UGameSocket.pas"/>
     194        <IsPartOfProject Value="True"/>
     195      </Unit14>
     196      <Unit15>
     197        <Filename Value="UTCP.pas"/>
     198        <IsPartOfProject Value="True"/>
     199      </Unit15>
    185200    </Units>
    186201  </ProjectOptions>
  • trunk/xtactics.lpr

    r174 r179  
    1111  CoolTranslator, TemplateGenerics, UFormPlayer
    1212  { you can add units after this },
    13   SysUtils, UFormMain, UFormMove, UFormNew, UFormCharts, UFormUnitMoves;
     13  SysUtils, UFormMain, UFormMove, UFormNew, UFormCharts, UFormUnitMoves,
     14  UFormChat, UGameSocket, UTCP;
    1415
    1516{$R *.res}
     
    3233  Application.CreateForm(TCore, Core);
    3334  Application.CreateForm(TFormMain, FormMain);
    34   Application.CreateForm(TFormNew, FormNew);
    3535  Application.CreateForm(TFormMove, FormMove);
    3636  Application.CreateForm(TFormPlayer, FormPlayer);
Note: See TracChangeset for help on using the changeset viewer.