Changeset 194
- Timestamp:
- May 14, 2018, 5:38:45 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNew.lfm
r179 r194 1 1 object FormNew: TFormNew 2 Left = 5963 Height = 6174 Top = 2435 Width = 7752 Left = 387 3 Height = 843 4 Top = 102 5 Width = 1069 6 6 Caption = 'New game' 7 ClientHeight = 6178 ClientWidth = 7757 ClientHeight = 843 8 ClientWidth = 1069 9 9 Constraints.MinHeight = 501 10 10 Constraints.MinWidth = 667 … … 15 15 OnShow = FormShow 16 16 Position = poMainFormCenter 17 LCLVersion = '1.8. 0.6'17 LCLVersion = '1.8.2.0' 18 18 object PageControl1: TPageControl 19 19 Left = 4 20 Height = 33020 Height = 556 21 21 Top = 4 22 Width = 76723 ActivePage = TabSheet Mode22 Width = 1061 23 ActivePage = TabSheet2 24 24 Align = alClient 25 25 BorderSpacing.Around = 4 26 TabIndex = 026 TabIndex = 2 27 27 TabOrder = 0 28 28 object TabSheetMode: TTabSheet … … 180 180 object TabSheet2: TTabSheet 181 181 Caption = 'Map' 182 ClientHeight = 297183 ClientWidth = 759182 ClientHeight = 523 183 ClientWidth = 1053 184 184 object Label1: TLabel 185 185 Left = 8 … … 222 222 Height = 47 223 223 Top = 8 224 Width = 508224 Width = 802 225 225 Max = 100 226 226 Min = 2 … … 235 235 Height = 47 236 236 Top = 49 237 Width = 508237 Width = 802 238 238 Max = 100 239 239 Min = 2 … … 293 293 Height = 27 294 294 Top = 110 295 Width = 271295 Width = 565 296 296 Anchors = [akTop, akLeft, akRight] 297 297 AutoSize = False … … 354 354 Left = 408 355 355 Height = 28 356 Top = 3 52356 Top = 384 357 357 Width = 98 358 358 MaxValue = 99 359 OnChange = SpinEditMapSizeYChange360 359 TabOrder = 11 361 360 Value = 12 … … 364 363 Left = 8 365 364 Height = 20 366 Top = 3 52365 Top = 384 367 366 Width = 172 368 367 Caption = 'Max random neutral units:' … … 373 372 Height = 28 374 373 Top = 184 375 Width = 492374 Width = 786 376 375 Anchors = [akTop, akLeft, akRight] 377 376 TabOrder = 12 378 377 end 379 378 object ButtonImageBrowse: TButton 380 Left = 644379 Left = 938 381 380 Height = 25 382 381 Top = 192 … … 402 401 Caption = 'Bridges between cells' 403 402 TabOrder = 14 403 end 404 object SpinEditMaxPower: TSpinEdit 405 Left = 408 406 Height = 28 407 Top = 344 408 Width = 98 409 MaxValue = 1000000 410 MinValue = 1 411 OnChange = SpinEditMaxPowerChange 412 TabOrder = 15 413 Value = 99 414 end 415 object Label10: TLabel 416 Left = 8 417 Height = 20 418 Top = 344 419 Width = 119 420 Caption = 'Max units per cell:' 421 ParentColor = False 404 422 end 405 423 end … … 491 509 Left = 0 492 510 Height = 45 493 Top = 572494 Width = 775511 Top = 798 512 Width = 1069 495 513 Align = alBottom 496 514 BevelOuter = bvNone 497 515 ClientHeight = 45 498 ClientWidth = 775516 ClientWidth = 1069 499 517 TabOrder = 1 500 518 object ButtonOk: TButton 501 Left = 587519 Left = 881 502 520 Height = 25 503 521 Top = 6 … … 509 527 end 510 528 object ButtonCancel: TButton 511 Left = 691529 Left = 985 512 530 Height = 25 513 531 Top = 6 … … 522 540 Left = 0 523 541 Height = 228 524 Top = 344525 Width = 775542 Top = 570 543 Width = 1069 526 544 Align = alBottom 527 545 BevelOuter = bvNone … … 532 550 Left = 0 533 551 Height = 6 534 Top = 338535 Width = 775552 Top = 564 553 Width = 1069 536 554 Align = alBottom 537 555 ResizeAnchor = akBottom -
trunk/Forms/UFormNew.pas
r193 r194 36 36 EditImageFile: TEdit; 37 37 Label1: TLabel; 38 Label10: TLabel; 38 39 Label11: TLabel; 39 40 Label12: TLabel; … … 61 62 RadioGroupGrowAmount: TRadioGroup; 62 63 RadioGroupGrowCells: TRadioGroup; 64 SpinEditMaxPower: TSpinEdit; 63 65 SpinEditServerPort: TSpinEdit; 64 66 SpinEditCityPercent: TSpinEdit; … … 98 100 procedure SpinEditMapSizeXChange(Sender: TObject); 99 101 procedure SpinEditMapSizeYChange(Sender: TObject); 102 procedure SpinEditMaxPowerChange(Sender: TObject); 100 103 procedure TrackBarSizeYChange(Sender: TObject); 101 104 procedure TrackBarSizeXChange(Sender: TObject); … … 191 194 end; 192 195 196 procedure TFormNew.SpinEditMaxPowerChange(Sender: TObject); 197 begin 198 UpdateInterface; 199 end; 200 193 201 procedure TFormNew.TrackBarSizeYChange(Sender: TObject); 194 202 begin … … 268 276 SpinEditServerPort.Enabled := RadioButtonModeNetworkServer.Checked; 269 277 ListViewServers.Enabled := RadioButtonModeNetworkClient.Checked; 278 PanelChat.Visible := RadioButtonModeNetworkClient.Checked or RadioButtonModeNetworkServer.Checked; 279 SpinEditNeutralUnits.MaxValue := SpinEditMaxPower.Value; 270 280 end; 271 281 … … 402 412 EditServerAddress.Text := LocalNetworkAddress; 403 413 SpinEditServerPort.Value := LocalNetworkPort; 414 SpinEditMaxPower.Value := Game.MaxPower; 404 415 end; 405 416 end; … … 429 440 Game.FogOfWar := CheckBoxFogOfWar.Checked; 430 441 Game.BridgeEnabled := CheckBoxBridges.Checked; 442 Game.MaxPower := SpinEditMaxPower.Value; 431 443 end; 432 444 end; -
trunk/Languages/xtactics.cs.po
r193 r194 366 366 msgid "Map width:" 367 367 msgstr "Šířka mapy:" 368 369 #: tformnew.label10.caption 370 msgid "Max units per cell:" 371 msgstr "Nejvíce jednotek na buňku:" 368 372 369 373 #: tformnew.label11.caption -
trunk/Languages/xtactics.po
r193 r194 351 351 #: tformnew.label1.caption 352 352 msgid "Map width:" 353 msgstr "" 354 355 #: tformnew.label10.caption 356 msgid "Max units per cell:" 353 357 msgstr "" 354 358 -
trunk/UCore.lfm
r193 r194 4 4 OldCreateOrder = False 5 5 Height = 676 6 HorizontalOffset = 3657 VerticalOffset = 2846 HorizontalOffset = 275 7 VerticalOffset = 190 8 8 Width = 1048 9 9 PPI = 120 -
trunk/UGame.pas
r193 r194 17 17 TriangleCellMulY = 1.05; 18 18 MaxPlayerCount = 8; 19 DefaultMaxPower = 99; 19 20 20 21 type … … 460 461 FogOfWar: Boolean; 461 462 BridgeEnabled: Boolean; 463 MaxPower: Integer; 462 464 function AttackProbability(AttackCount, DefendCount: Integer): Double; 463 465 procedure LoadConfig(Config: TXmlConfig; Path: string); … … 1406 1408 DefaultCellSize.X := ReadInteger(Node, 'DefaultCellSizeX', 1); 1407 1409 DefaultCellSize.Y := ReadInteger(Node, 'DefaultCellSizeY', 1); 1408 MaxPower := ReadInteger(Node, 'MaxPower', 99);1410 MaxPower := ReadInteger(Node, 'MaxPower', DefaultMaxPower); 1409 1411 Shape := TMapShape(ReadInteger(Node, 'Shape', Integer(msRectangle))); 1410 1412 Node2 := Node.FindNode('Cells'); … … 1656 1658 constructor TMap.Create; 1657 1659 begin 1658 MaxPower := 99;1660 MaxPower := DefaultMaxPower; 1659 1661 DefaultCellSize := TPoint.Create(220, 220); 1660 1662 Cells := TCells.Create; … … 3260 3262 VoidPercentage := ReadInteger(RootNode, 'VoidPercentage', 0); 3261 3263 MaxNeutralUnits := ReadInteger(RootNode, 'MaxNeutralUnits', 3); 3264 MaxPower := ReadInteger(RootNode, 'MaxPower', DefaultMaxPower); 3262 3265 GrowCells := TGrowCells(ReadInteger(RootNode, 'GrowCells', Integer(gcNone))); 3263 3266 GrowAmount := TGrowAmount(ReadInteger(RootNode, 'GrowAmount', Integer(gaByOne))); … … 3309 3312 WriteInteger(RootNode, 'VoidPercentage', VoidPercentage); 3310 3313 WriteInteger(RootNode, 'MaxNeutralUnits', MaxNeutralUnits); 3314 WriteInteger(RootNode, 'MaxPower', MaxPower); 3311 3315 WriteInteger(RootNode, 'GrowCells', Integer(GrowCells)); 3312 3316 WriteInteger(RootNode, 'GrowAmount', Integer(GrowAmount)); … … 3447 3451 VoidEnabled := True; 3448 3452 VoidPercentage := 20; 3449 MaxNeutralUnits := 4; 3453 MaxPower := DefaultMaxPower; 3454 MaxNeutralUnits := Min(4, MaxPower); 3450 3455 3451 3456 Map.Game := Self; … … 3477 3482 3478 3483 Map.Generate; 3484 Map.MaxPower := MaxPower; 3479 3485 BuildTerrain; 3480 3486
Note:
See TracChangeset
for help on using the changeset viewer.