Changeset 304
- Timestamp:
- Aug 11, 2019, 4:53:05 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.pas
r302 r304 146 146 FormMove := TFormMove.Create(nil); 147 147 try 148 // Set controls value maximum before value itself as the controls update their values mutually 148 149 if Update then FormMove.SpinEditOnce.MaxValue := CellFrom.GetAvialPower + CountOnce 149 150 else FormMove.SpinEditOnce.MaxValue := CellFrom.GetAvialPower; -
trunk/Forms/UFormMain.lfm
r295 r304 1 1 object FormMain: TFormMain 2 2 Left = 826 3 Height = 6213 Height = 745 4 4 Top = 419 5 Width = 7755 Width = 930 6 6 Caption = 'xTactics' 7 ClientHeight = 5968 ClientWidth = 7759 DesignTimePPI = 1 207 ClientHeight = 711 8 ClientWidth = 930 9 DesignTimePPI = 144 10 10 Menu = MainMenu1 11 11 OnActivate = FormActivate … … 15 15 OnKeyUp = FormKeyUp 16 16 OnShow = FormShow 17 LCLVersion = '2.0. 0.4'17 LCLVersion = '2.0.2.0' 18 18 WindowState = wsMaximized 19 19 object ToolBar1: TToolBar 20 20 Left = 0 21 Height = 3321 Height = 40 22 22 Top = 0 23 Width = 77524 ButtonHeight = 2725 ButtonWidth = 2723 Width = 930 24 ButtonHeight = 32 25 ButtonWidth = 32 26 26 Images = Core.ImageListSmall 27 27 ParentFont = False … … 36 36 end 37 37 object ToolButton3: TToolButton 38 Left = 2838 Left = 33 39 39 Top = 2 40 40 Action = Core.AGameEnd 41 41 end 42 42 object ToolButton4: TToolButton 43 Left = 5543 Left = 65 44 44 Top = 2 45 45 Action = Core.AGameRestart 46 46 end 47 47 object ToolButton5: TToolButton 48 Left = 1 4448 Left = 173 49 49 Top = 2 50 50 Action = Core.ASettings 51 51 end 52 52 object ToolButton9: TToolButton 53 Left = 1 4054 Height = 2753 Left = 167 54 Height = 32 55 55 Top = 2 56 56 Style = tbsDivider 57 57 end 58 58 object ToolButton11: TToolButton 59 Left = 8659 Left = 103 60 60 Top = 2 61 61 Action = Core.AGameLoad 62 62 end 63 63 object ToolButton12: TToolButton 64 Left = 1 1364 Left = 135 65 65 Top = 2 66 66 Action = Core.AGameSave 67 67 end 68 68 object ToolButton13: TToolButton 69 Left = 17169 Left = 205 70 70 Top = 2 71 71 Action = Core.AExit 72 72 end 73 73 object ToolButton2: TToolButton 74 Left = 8275 Height = 2774 Left = 97 75 Height = 32 76 76 Top = 2 77 77 Style = tbsDivider … … 80 80 object PanelMain: TPanel 81 81 Left = 0 82 Height = 56383 Top = 3384 Width = 77582 Height = 671 83 Top = 40 84 Width = 930 85 85 Align = alClient 86 86 BevelOuter = bvNone … … 90 90 object MainMenu1: TMainMenu 91 91 Images = Core.ImageListSmall 92 left = 18793 top = 4 092 left = 224 93 top = 48 94 94 object MenuItem1: TMenuItem 95 95 Caption = 'Game' … … 210 210 Interval = 20 211 211 OnTimer = Timer1Timer 212 left = 1 07213 top = 2 19212 left = 128 213 top = 263 214 214 end 215 215 object ActionList1: TActionList 216 216 Images = Core.ImageListSmall 217 left = 2 33218 top = 1 27217 left = 280 218 top = 152 219 219 object AToolBarBigIcons: TAction 220 220 Caption = 'Toolbar big icons' … … 239 239 end 240 240 object PopupMenuToolbar: TPopupMenu 241 left = 377242 top = 82241 left = 452 242 top = 98 243 243 object MenuItem18: TMenuItem 244 244 Action = AToolBarBigIcons -
trunk/Forms/UFormNew.lfm
r295 r304 1 1 object FormNew: TFormNew 2 2 Left = 478 3 Height = 6213 Height = 745 4 4 Top = 526 5 Width = 1 0095 Width = 1211 6 6 Caption = 'New game' 7 ClientHeight = 6218 ClientWidth = 1 0099 Constraints.MinHeight = 41810 Constraints.MinWidth = 55611 DesignTimePPI = 1 207 ClientHeight = 745 8 ClientWidth = 1211 9 Constraints.MinHeight = 502 10 Constraints.MinWidth = 667 11 DesignTimePPI = 144 12 12 OnClose = FormClose 13 13 OnCreate = FormCreate … … 15 15 OnShow = FormShow 16 16 Position = poMainFormCenter 17 LCLVersion = '2.0. 0.4'17 LCLVersion = '2.0.2.0' 18 18 object PageControl1: TPageControl 19 Left = 320 Height = 53021 Top = 5022 Width = 67219 Left = 4 20 Height = 635 21 Top = 60 22 Width = 806 23 23 ActivePage = TabSheetRules 24 24 Align = alClient 25 BorderSpacing.Around = 325 BorderSpacing.Around = 4 26 26 ParentFont = False 27 27 TabIndex = 3 … … 30 30 object TabSheetMode: TTabSheet 31 31 Caption = 'Mode' 32 ClientHeight = 59 632 ClientHeight = 595 33 33 ClientWidth = 796 34 34 ParentFont = False … … 45 45 TabOrder = 0 46 46 object RadioButtonModeLocal: TRadioButton 47 Left = 847 Left = 10 48 48 Height = 30 49 Top = 1 249 Top = 14 50 50 Width = 70 51 51 Caption = 'Local' … … 57 57 end 58 58 object RadioButtonModeNetworkServer: TRadioButton 59 Left = 859 Left = 10 60 60 Height = 30 61 Top = 4 061 Top = 48 62 62 Width = 156 63 63 Caption = 'Network server' … … 67 67 end 68 68 object RadioButtonModeNetworkClient: TRadioButton 69 Left = 869 Left = 10 70 70 Height = 30 71 Top = 1 2771 Top = 152 72 72 Width = 151 73 73 Caption = 'Network client' … … 77 77 end 78 78 object EditServerAddress: TEdit 79 Left = 2 079 Left = 24 80 80 Height = 43 81 Top = 9382 Width = 18381 Top = 112 82 Width = 220 83 83 ParentFont = False 84 84 TabOrder = 3 85 85 end 86 86 object SpinEditServerPort: TSpinEdit 87 Left = 2 1387 Left = 256 88 88 Height = 43 89 Top = 9390 Width = 6689 Top = 112 90 Width = 79 91 91 MaxValue = 65535 92 92 ParentFont = False … … 94 94 end 95 95 object Label11: TLabel 96 Left = 2 1397 Height = 26 98 Top = 7396 Left = 256 97 Height = 26 98 Top = 88 99 99 Width = 41 100 100 Caption = 'Port:' … … 103 103 end 104 104 object Label12: TLabel 105 Left = 2 0106 Height = 26 107 Top = 73105 Left = 24 106 Height = 26 107 Top = 88 108 108 Width = 74 109 109 Caption = 'Address:' … … 112 112 end 113 113 object ListViewServers: TListView 114 Left = 2 2115 Height = 403116 Top = 1 51117 Width = 278114 Left = 26 115 Height = 365 116 Top = 181 117 Width = 334 118 118 Anchors = [akTop, akLeft, akBottom] 119 119 Columns = < 120 120 item 121 121 Caption = 'Name' 122 Width = 83122 Width = 100 123 123 end 124 124 item 125 125 Caption = 'Address' 126 Width = 182126 Width = 219 127 127 end> 128 128 MultiSelect = True … … 140 140 end 141 141 object Button1: TButton 142 Left = 2 2143 Height = 26144 Top = 5 63145 Width = 78142 Left = 26 143 Height = 31 144 Top = 557 145 Width = 94 146 146 Action = AServerAdd 147 147 Anchors = [akLeft, akBottom] … … 150 150 end 151 151 object Button2: TButton 152 Left = 2 00153 Height = 26154 Top = 5 63155 Width = 78152 Left = 240 153 Height = 31 154 Top = 557 155 Width = 94 156 156 Action = AServerRemove 157 157 Anchors = [akLeft, akBottom] … … 160 160 end 161 161 object Button3: TButton 162 Left = 1 13163 Height = 25164 Top = 5 63165 Width = 78162 Left = 136 163 Height = 30 164 Top = 556 165 Width = 94 166 166 Action = AServerModify 167 167 Anchors = [akLeft, akBottom] … … 173 173 object TabSheetPlayers: TTabSheet 174 174 Caption = 'Players' 175 ClientHeight = 59 6175 ClientHeight = 595 176 176 ClientWidth = 796 177 177 ParentFont = False … … 189 189 object TabSheetMap: TTabSheet 190 190 Caption = 'Map' 191 ClientHeight = 59 6191 ClientHeight = 595 192 192 ClientWidth = 796 193 193 OnShow = TabSheetMapShow … … 205 205 TabOrder = 0 206 206 object Label1: TLabel 207 Left = 7208 Height = 26 209 Top = 8207 Left = 8 208 Height = 26 209 Top = 10 210 210 Width = 95 211 211 Caption = 'Map width:' … … 214 214 end 215 215 object Label2: TLabel 216 Left = 7217 Height = 26 218 Top = 48216 Left = 8 217 Height = 26 218 Top = 58 219 219 Width = 102 220 220 Caption = 'Map height:' … … 223 223 end 224 224 object SpinEditMapSizeX: TSpinEdit 225 Left = 1 07225 Left = 128 226 226 Height = 43 227 Top = 3228 Width = 82227 Top = 4 228 Width = 98 229 229 MinValue = 2 230 230 OnChange = SpinEditMapSizeXChange … … 234 234 end 235 235 object SpinEditMapSizeY: TSpinEdit 236 Left = 1 07236 Left = 128 237 237 Height = 43 238 Top = 46239 Width = 82238 Top = 55 239 Width = 98 240 240 MinValue = 2 241 241 OnChange = SpinEditMapSizeYChange … … 245 245 end 246 246 object TrackBarSizeX: TTrackBar 247 Left = 2 00248 Height = 48249 Top = 7250 Width = 5 87247 Left = 240 248 Height = 58 249 Top = 8 250 Width = 545 251 251 Max = 100 252 252 Min = 2 … … 259 259 end 260 260 object TrackBarSizeY: TTrackBar 261 Left = 2 00262 Height = 48263 Top = 4 1264 Width = 5 87261 Left = 240 262 Height = 58 263 Top = 49 264 Width = 545 265 265 Max = 100 266 266 Min = 2 … … 273 273 end 274 274 object Label5: TLabel 275 Left = 7276 Height = 26 277 Top = 87275 Left = 8 276 Height = 26 277 Top = 104 278 278 Width = 83 279 279 Caption = 'Grid type:' … … 282 282 end 283 283 object ComboBoxGridType: TComboBox 284 Left = 1 22284 Left = 146 285 285 Height = 28 286 Top = 87287 Width = 253288 ItemHeight = 20286 Top = 104 287 Width = 304 288 ItemHeight = 0 289 289 Items.Strings = ( 290 290 'Hexagonal' … … 300 300 end 301 301 object ComboBoxMapShape: TComboBox 302 Left = 1 22302 Left = 146 303 303 Height = 28 304 Top = 1 20305 Width = 253306 ItemHeight = 20304 Top = 144 305 Width = 304 306 ItemHeight = 0 307 307 Items.Strings = ( 308 308 'Hexagonal' … … 316 316 end 317 317 object Label8: TLabel 318 Left = 7319 Height = 26 320 Top = 1 20318 Left = 8 319 Height = 26 320 Top = 144 321 321 Width = 98 322 322 Caption = 'Map shape:' … … 325 325 end 326 326 object CheckBoxSymetricMap: TCheckBox 327 Left = 7328 Height = 2 2329 Top = 2 07330 Width = 3 89327 Left = 8 328 Height = 26 329 Top = 248 330 Width = 308 331 331 Anchors = [akTop, akLeft, akRight] 332 332 AutoSize = False … … 337 337 end 338 338 object SpinEditVoidPercent: TSpinEdit 339 Left = 180339 Left = 216 340 340 Height = 43 341 Top = 262342 Width = 88341 Top = 314 342 Width = 106 343 343 MinValue = 1 344 344 OnChange = SpinEditVoidPercentChange … … 348 348 end 349 349 object CheckBoxVoid: TCheckBox 350 Left = 7350 Left = 8 351 351 Height = 30 352 Top = 270352 Top = 324 353 353 Width = 189 354 354 Caption = 'Inaccessible places' … … 358 358 end 359 359 object CheckBoxCity: TCheckBox 360 Left = 7360 Left = 8 361 361 Height = 30 362 Top = 3 07362 Top = 368 363 363 Width = 73 364 364 Caption = 'Cities' … … 368 368 end 369 369 object SpinEditCityPercent: TSpinEdit 370 Left = 180370 Left = 216 371 371 Height = 43 372 Top = 3 00373 Width = 88372 Top = 360 373 Width = 106 374 374 MinValue = 1 375 375 OnChange = SpinEditCityPercentChange … … 379 379 end 380 380 object Label4: TLabel 381 Left = 276382 Height = 26 383 Top = 3 07381 Left = 331 382 Height = 26 383 Top = 368 384 384 Width = 15 385 385 Caption = '%' … … 388 388 end 389 389 object Label3: TLabel 390 Left = 276391 Height = 26 392 Top = 270390 Left = 331 391 Height = 26 392 Top = 324 393 393 Width = 15 394 394 Caption = '%' … … 397 397 end 398 398 object SpinEditNeutralUnits: TSpinEdit 399 Left = 260399 Left = 312 400 400 Height = 43 401 Top = 4 07402 Width = 82401 Top = 488 402 Width = 98 403 403 MaxValue = 99 404 404 OnChange = SpinEditNeutralUnitsChange … … 408 408 end 409 409 object Label7: TLabel 410 Left = 7411 Height = 26 412 Top = 4 13410 Left = 8 411 Height = 26 412 Top = 496 413 413 Width = 227 414 414 Caption = 'Max random neutral units:' … … 417 417 end 418 418 object EditImageFile: TEdit 419 Left = 1 20419 Left = 144 420 420 Height = 43 421 Top = 1 53422 Width = 5 74421 Top = 184 422 Width = 530 423 423 Anchors = [akTop, akLeft, akRight] 424 424 OnChange = EditImageFileChange … … 427 427 end 428 428 object ButtonImageBrowse: TButton 429 Left = 700430 Height = 3 2431 Top = 1 58432 Width = 82429 Left = 681 430 Height = 38 431 Top = 190 432 Width = 98 433 433 Anchors = [akTop, akRight] 434 434 Caption = 'Browse' … … 438 438 end 439 439 object Label9: TLabel 440 Left = 7441 Height = 26 442 Top = 1 59440 Left = 8 441 Height = 26 442 Top = 191 443 443 Width = 90 444 444 Caption = 'Image file:' … … 447 447 end 448 448 object CheckBoxBridges: TCheckBox 449 Left = 7449 Left = 8 450 450 Height = 30 451 Top = 340451 Top = 408 452 452 Width = 212 453 453 Caption = 'Bridges between cells' … … 457 457 end 458 458 object SpinEditMaxPower: TSpinEdit 459 Left = 260459 Left = 312 460 460 Height = 43 461 Top = 367462 Width = 82461 Top = 440 462 Width = 98 463 463 MaxValue = 1000000 464 464 MinValue = 1 … … 469 469 end 470 470 object Label10: TLabel 471 Left = 7472 Height = 26 473 Top = 373471 Left = 8 472 Height = 26 473 Top = 448 474 474 Width = 156 475 475 Caption = 'Max units per cell:' … … 478 478 end 479 479 object CheckBoxCyclicMap: TCheckBox 480 Left = 7481 Height = 2 2482 Top = 2 36483 Width = 3 89480 Left = 8 481 Height = 26 482 Top = 283 483 Width = 308 484 484 Anchors = [akTop, akLeft, akRight] 485 485 AutoSize = False … … 490 490 end 491 491 object Image1: TImage 492 Left = 349493 Height = 263494 Top = 2 27495 Width = 432492 Left = 419 493 Height = 316 494 Top = 272 495 Width = 359 496 496 Anchors = [akTop, akLeft, akRight] 497 497 OnResize = Image1Resize 498 498 end 499 499 object Label15: TLabel 500 Left = 349501 Height = 26 502 Top = 2 00500 Left = 419 501 Height = 26 502 Top = 240 503 503 Width = 71 504 504 Caption = 'Preview:' … … 507 507 end 508 508 object ButtonRandomize: TButton 509 Left = 8510 Height = 3 2511 Top = 450512 Width = 1 28509 Left = 10 510 Height = 38 511 Top = 540 512 Width = 154 513 513 Caption = 'Randomize' 514 514 OnClick = ButtonRandomizeClick … … 520 520 object TabSheetRules: TTabSheet 521 521 Caption = 'Rules' 522 ClientHeight = 497523 ClientWidth = 664522 ClientHeight = 595 523 ClientWidth = 796 524 524 ParentFont = False 525 525 object Panel4: TPanel 526 526 Left = 0 527 Height = 497527 Height = 595 528 528 Top = 0 529 Width = 664529 Width = 796 530 530 Align = alClient 531 531 BevelOuter = bvNone 532 ClientHeight = 497533 ClientWidth = 664532 ClientHeight = 595 533 ClientWidth = 796 534 534 ParentFont = False 535 535 TabOrder = 0 536 536 object RadioGroupGrowCells: TRadioGroup 537 Left = 1 2538 Height = 88539 Top = 87540 Width = 260537 Left = 14 538 Height = 106 539 Top = 104 540 Width = 312 541 541 AutoFill = True 542 542 Caption = 'Growing cells' … … 548 548 ChildSizing.Layout = cclLeftToRightThenTopToBottom 549 549 ChildSizing.ControlsPerLine = 1 550 ClientHeight = 63551 ClientWidth = 256550 ClientHeight = 79 551 ClientWidth = 310 552 552 Items.Strings = ( 553 553 'None' … … 559 559 end 560 560 object Label6: TLabel 561 Left = 7562 Height = 2 0563 Top = 2 07564 Width = 94561 Left = 8 562 Height = 26 563 Top = 248 564 Width = 120 565 565 Caption = 'Win objective:' 566 566 ParentColor = False … … 568 568 end 569 569 object ComboBoxWinObjective: TComboBox 570 Left = 187571 Height = 28572 Top = 2 03573 Width = 273574 ItemHeight = 20570 Left = 224 571 Height = 38 572 Top = 244 573 Width = 328 574 ItemHeight = 0 575 575 Items.Strings = ( 576 576 'Defeat all oponents' … … 585 585 end 586 586 object RadioGroupGrowAmount: TRadioGroup 587 Left = 1 2588 Height = 63589 Top = 1 3590 Width = 254587 Left = 14 588 Height = 76 589 Top = 16 590 Width = 305 591 591 AutoFill = True 592 592 Caption = 'Per turn grow amount' … … 598 598 ChildSizing.Layout = cclLeftToRightThenTopToBottom 599 599 ChildSizing.ControlsPerLine = 1 600 ClientHeight = 38601 ClientWidth = 250600 ClientHeight = 49 601 ClientWidth = 303 602 602 Items.Strings = ( 603 603 'By one' … … 608 608 end 609 609 object CheckBoxFogOfWar: TCheckBox 610 Left = 280611 Height = 24612 Top = 2 0613 Width = 95610 Left = 336 611 Height = 30 612 Top = 24 613 Width = 115 614 614 Caption = 'Fog of war' 615 615 ParentFont = False … … 617 617 end 618 618 object PageControlWinObjective: TPageControl 619 Left = 1 0620 Height = 65621 Top = 2 42622 Width = 645619 Left = 12 620 Height = 78 621 Top = 290 622 Width = 773 623 623 ActivePage = TabSheetCaptureEntireMap 624 624 Anchors = [akTop, akLeft, akRight] … … 638 638 ParentFont = False 639 639 object Label14: TLabel 640 Left = 7640 Left = 8 641 641 Height = 20 642 Top = 1 3642 Top = 16 643 643 Width = 125 644 644 Caption = 'Special cells count:' … … 647 647 end 648 648 object SpinEditSpecialCells: TSpinEdit 649 Left = 197649 Left = 236 650 650 Height = 28 651 Top = 7652 Width = 1 32651 Top = 8 652 Width = 158 653 653 MaxValue = 1000 654 654 MinValue = 1 … … 663 663 ParentFont = False 664 664 object Label13: TLabel 665 Left = 7665 Left = 8 666 666 Height = 20 667 Top = 1 3667 Top = 16 668 668 Width = 111 669 669 Caption = 'Number of turns:' … … 672 672 end 673 673 object SpinEditTurns: TSpinEdit 674 Left = 197674 Left = 236 675 675 Height = 28 676 Top = 7677 Width = 1 32676 Top = 8 677 Width = 158 678 678 MaxValue = 1000 679 679 MinValue = 1 … … 695 695 object PanelButtons: TPanel 696 696 Left = 0 697 Height = 38698 Top = 583699 Width = 1 009697 Height = 46 698 Top = 699 699 Width = 1211 700 700 Align = alBottom 701 701 BevelOuter = bvNone 702 ClientHeight = 38703 ClientWidth = 1 009702 ClientHeight = 46 703 ClientWidth = 1211 704 704 ParentFont = False 705 705 TabOrder = 1 706 706 object ButtonOk: TButton 707 Left = 853708 Height = 2 1709 Top = 5710 Width = 62707 Left = 1024 708 Height = 25 709 Top = 7 710 Width = 74 711 711 Anchors = [akRight, akBottom] 712 712 Caption = 'Ok' … … 717 717 end 718 718 object ButtonCancel: TButton 719 Left = 939720 Height = 2 1721 Top = 5722 Width = 62719 Left = 1127 720 Height = 25 721 Top = 7 722 Width = 74 723 723 Anchors = [akRight, akBottom] 724 724 Caption = 'Cancel' … … 729 729 end 730 730 object PanelChat: TPanel 731 Left = 683732 Height = 536733 Top = 47734 Width = 3 26731 Left = 820 732 Height = 643 733 Top = 56 734 Width = 391 735 735 Align = alRight 736 736 BevelOuter = bvNone … … 739 739 end 740 740 object Splitter1: TSplitter 741 Left = 678742 Height = 536743 Top = 47744 Width = 5741 Left = 814 742 Height = 643 743 Top = 56 744 Width = 6 745 745 Align = alRight 746 746 ResizeAnchor = akRight … … 748 748 object Panel5: TPanel 749 749 Left = 0 750 Height = 47750 Height = 56 751 751 Top = 0 752 Width = 1 009752 Width = 1211 753 753 Align = alTop 754 754 BevelOuter = bvNone 755 ClientHeight = 47756 ClientWidth = 1 009755 ClientHeight = 56 756 ClientWidth = 1211 757 757 ParentFont = False 758 758 TabOrder = 4 759 759 object Label16: TLabel 760 Left = 1 0761 Height = 2 0762 Top = 1 3763 Width = 91760 Left = 12 761 Height = 26 762 Top = 16 763 Width = 121 764 764 Caption = 'Game system:' 765 765 ParentColor = False … … 767 767 end 768 768 object ComboBoxGameSystem: TComboBox 769 Left = 1 47770 Height = 28771 Top = 8772 Width = 2 12773 ItemHeight = 20769 Left = 176 770 Height = 42 771 Top = 10 772 Width = 254 773 ItemHeight = 0 774 774 OnChange = ComboBoxGameSystemChange 775 775 ParentFont = False … … 778 778 end 779 779 object ButtonGameSystems: TButton 780 Left = 369781 Height = 3 2782 Top = 1 0783 Width = 94780 Left = 443 781 Height = 38 782 Top = 12 783 Width = 113 784 784 Caption = 'Manage' 785 785 OnClick = ButtonGameSystemsClick … … 790 790 object ActionList1: TActionList 791 791 Images = Core.ImageListSmall 792 left = 720793 top = 180792 left = 864 793 top = 216 794 794 object AServerAdd: TAction 795 795 Caption = 'Add' … … 806 806 end 807 807 object OpenPictureDialog1: TOpenPictureDialog 808 left = 720809 top = 3 00808 left = 864 809 top = 360 810 810 end 811 811 object PopupMenuServers: TPopupMenu 812 left = 720813 top = 1 13812 left = 864 813 top = 136 814 814 object MenuItem4: TMenuItem 815 815 Action = AServerAdd … … 825 825 Interval = 500 826 826 OnTimer = TimerMapPreviewTimer 827 left = 720828 top = 372827 left = 864 828 top = 446 829 829 end 830 830 end -
trunk/Forms/UFormNew.pas
r298 r304 304 304 SpinEditTurns.Value := StayAliveForDefinedTurns; 305 305 SpinEditSpecialCells.Value := SpecialCaptureCellCount; 306 GameSystem := Game.GameSystem; 307 ComboBoxGameSystem.ItemIndex := ComboBoxGameSystem.Items.IndexOf(GameSystemName); 306 ComboBoxGameSystem.ItemIndex := ComboBoxGameSystem.Items.IndexOf(GameSystem.GetName); 308 307 if (ComboBoxGameSystem.ItemIndex = -1) and (ComboBoxGameSystem.Items.Count > 0) then 309 308 ComboBoxGameSystem.ItemIndex := 0; … … 335 334 StayAliveForDefinedTurns := SpinEditTurns.Value; 336 335 SpecialCaptureCellCount := SpinEditSpecialCells.Value; 337 if ComboBoxGameSystem.ItemIndex <> -1 then begin338 GameSystem := TGameSystem(ComboBoxGameSystem.Items.Objects[ComboBoxGameSystem.ItemIndex]);339 GameSystemName := GameSystem.GetName;340 end else begin341 GameSystem := nil;342 GameSystemName := '';343 end;344 336 end; 345 337 end; … … 397 389 begin 398 390 Image1.Height := Round(Image1.Width * SpinEditMapSizeY.Value / SpinEditMapSizeX.Value); 399 GamePreview.GameSystem := Core.GameSystems.First;391 GamePreview.GameSystem.Assign(FServer.Game.GameSystem); 400 392 SaveGame(GamePreview); 401 393 GamePreview.PostConfig; … … 567 559 procedure TFormNew.ComboBoxGameSystemChange(Sender: TObject); 568 560 begin 569 FServer.Game.GameSystem := TGameSystem(ComboBoxGameSystem.Items.Objects[ComboBoxGameSystem.ItemIndex]);561 FServer.Game.GameSystem.Assign(TGameSystem(ComboBoxGameSystem.Items.Objects[ComboBoxGameSystem.ItemIndex])); 570 562 UpdateInterface; 571 563 MapPreviewRedraw; -
trunk/Systems/Dune 2.xts
r292 r304 46 46 <ViewRange>0</ViewRange> 47 47 </UnitKind> 48 <UnitKind> 49 <Id>0</Id> 50 <Name>Harvester</Name> 51 <Stack>0</Stack> 52 <Cost>0</Cost> 53 <Moves>1</Moves> 54 <PowerAttack>0</PowerAttack> 55 <PowerDefense>0</PowerDefense> 56 <ViewRange>1</ViewRange> 57 </UnitKind> 48 58 </UnitKinds> 49 59 <BuildingKinds/> -
trunk/UCore.lfm
r301 r304 2821 2821 AppName = 'xTactics' 2822 2822 Description = 'Turn-based strategy game inspired by classic Risk board game. The game is highly configurable to allow to adjust battle field and game rules.' 2823 ReleaseDate = 436 562823 ReleaseDate = 43688 2824 2824 RegistryKey = '\Software\xTactics' 2825 2825 RegistryRoot = rrKeyCurrentUser -
trunk/UCore.pas
r301 r304 616 616 end; 617 617 if GameSystems.Count > 0 then begin 618 GameSettings.GameSystem := GameSystems.First;619 Game.GameSystem := GameSystems.First;618 GameSettings.GameSystem.Assign(GameSystems.First); 619 Game.GameSystem.Assign(GameSystems.First); 620 620 end; 621 621 end; … … 740 740 // GameSystemName needs to be loaded before game systems config itself. 741 741 // Players reference Nations from game system. 742 GameSettings.GameSystemName := string(XMLConfig1.GetValue(DOMString('Game/GameSystemName'), DOMString('HexWars'))); 743 GameSettings.GameSystem := GameSystems.SearchByName(GameSettings.GameSystemName); 744 742 GameSettings.GameSystem.Assign(GameSystems.SearchByName(string(XMLConfig1.GetValue(DOMString('Game/GameSystemName'), DOMString('HexWars'))))); 745 743 GameSettings.LoadConfig(XMLConfig1, 'Game'); 746 if not Assigned(GameSettings.GameSystem) then747 GameSettings.GameSystem := GameSystems.First;748 744 Server.LoadConfig(XMLConfig1, 'Server'); 749 745 ServerList.LoadConfig(XmlConfig1, 'ServerList'); -
trunk/UGame.pas
r301 r304 37 37 TGame = class 38 38 private 39 FGameSystem: TGameSystem;40 39 FMapType: TMapType; 41 40 FOnChange: TNotifyEvent; … … 49 48 ProbabilityMatrix: array of array of Single; 50 49 procedure RecordTurnStats; 51 procedure SetGameSystem(AValue: TGameSystem);52 50 procedure SetMapType(AValue: TMapType); 53 51 procedure SetRunning(AValue: Boolean); … … 61 59 procedure WinObjectiveMapPrepare; 62 60 public 61 GameSystem: TGameSystem; 63 62 FileName: string; 64 63 DevelMode: Boolean; … … 87 86 StoredRandSeed: Cardinal; 88 87 GeneratePlayers: Boolean; 89 GameSystemName: string;90 88 procedure PostConfig; 91 89 procedure Assign(Source: TGame); … … 105 103 property Running: Boolean read FRunning write SetRunning; 106 104 property MapType: TMapType read FMapType write SetMapType; 107 property GameSystem: TGameSystem read FGameSystem write SetGameSystem;108 105 published 109 106 property OnMoveUpdated: TMoveUpdatedEvent read FOnMoveUpdated write FOnMoveUpdated; … … 504 501 BridgeEnabled := Source.BridgeEnabled; 505 502 MaxPower := Source.MaxPower; 506 GameSystem := Source.GameSystem;503 GameSystem.Assign(Source.GameSystem); 507 504 end; 508 505 … … 532 529 SetValue(DOMString(Path + '/MaxPower'), MaxPower); 533 530 Players.SaveConfig(Config, Path + '/Players'); 534 SetValue(DOMString(Path + '/GameSystemName'), DOMString(GameSystem Name));531 SetValue(DOMString(Path + '/GameSystemName'), DOMString(GameSystem.GetName)); 535 532 end; 536 533 end; … … 733 730 end; 734 731 735 procedure TGame.SetGameSystem(AValue: TGameSystem);736 begin737 if FGameSystem = AValue then Exit;738 FGameSystem := AValue;739 if Assigned(FGameSystem) then GameSystemName := FGameSystem.GetName740 else GameSystemName := '';741 end;742 743 732 procedure TGame.NextPlayer; 744 733 var … … 860 849 constructor TGame.Create; 861 850 begin 851 GameSystem := TGameSystem.Create; 862 852 Units := TUnits.Create; 863 853 Units.Game := Self; … … 889 879 FreeAndNil(Buildings); 890 880 FreeAndNil(Units); 881 FreeAndNil(GameSystem); 891 882 inherited Destroy; 892 883 end;
Note:
See TracChangeset
for help on using the changeset viewer.