- Timestamp:
- May 16, 2018, 11:03:48 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNew.lfm
r196 r197 1 1 object FormNew: TFormNew 2 2 Left = 387 3 Height = 8433 Height = 748 4 4 Top = 102 5 Width = 10695 Width = 795 6 6 Caption = 'New game' 7 ClientHeight = 8438 ClientWidth = 10697 ClientHeight = 748 8 ClientWidth = 795 9 9 Constraints.MinHeight = 501 10 10 Constraints.MinWidth = 667 … … 18 18 object PageControl1: TPageControl 19 19 Left = 4 20 Height = 55620 Height = 461 21 21 Top = 4 22 Width = 106123 ActivePage = TabSheet Mode22 Width = 787 23 ActivePage = TabSheet3 24 24 Align = alClient 25 25 BorderSpacing.Around = 4 26 TabIndex = 026 TabIndex = 3 27 27 TabOrder = 0 28 28 object TabSheetMode: TTabSheet 29 29 Caption = 'Mode' 30 ClientHeight = 52331 ClientWidth = 105330 ClientHeight = 362 31 ClientWidth = 694 32 32 object RadioButtonModeLocal: TRadioButton 33 33 Left = 10 … … 90 90 object ListViewServers: TListView 91 91 Left = 26 92 Height = 29192 Height = 130 93 93 Top = 181 94 94 Width = 334 … … 118 118 Left = 27 119 119 Height = 31 120 Top = 484120 Top = 323 121 121 Width = 94 122 122 Action = AServerAdd … … 127 127 Left = 240 128 128 Height = 31 129 Top = 484129 Top = 323 130 130 Width = 94 131 131 Action = AServerRemove … … 136 136 Left = 136 137 137 Height = 30 138 Top = 484138 Top = 323 139 139 Width = 94 140 140 Action = AServerModify … … 145 145 object TabSheet1: TTabSheet 146 146 Caption = 'Players' 147 ClientHeight = 297148 ClientWidth = 7 59147 ClientHeight = 428 148 ClientWidth = 779 149 149 object ListViewPlayers: TListView 150 150 Left = 4 151 Height = 247151 Height = 378 152 152 Top = 4 153 Width = 7 51153 Width = 771 154 154 Align = alTop 155 155 Anchors = [akTop, akLeft, akRight, akBottom] … … 188 188 Left = 224 189 189 Height = 25 190 Top = 259190 Top = 390 191 191 Width = 83 192 192 Action = APlayerRemove … … 197 197 Left = 16 198 198 Height = 25 199 Top = 259199 Top = 390 200 200 Width = 83 201 201 Action = APlayerAdd … … 206 206 Left = 120 207 207 Height = 25 208 Top = 259208 Top = 390 209 209 Width = 83 210 210 Action = APlayerModify … … 216 216 object TabSheet2: TTabSheet 217 217 Caption = 'Map' 218 ClientHeight = 523219 ClientWidth = 1053218 ClientHeight = 428 219 ClientWidth = 779 220 220 object Label1: TLabel 221 221 Left = 8 … … 258 258 Height = 47 259 259 Top = 8 260 Width = 802260 Width = 528 261 261 Max = 100 262 262 Min = 2 … … 271 271 Height = 47 272 272 Top = 49 273 Width = 802273 Width = 528 274 274 Max = 100 275 275 Min = 2 … … 329 329 Height = 27 330 330 Top = 110 331 Width = 565331 Width = 291 332 332 Anchors = [akTop, akLeft, akRight] 333 333 AutoSize = False … … 408 408 Height = 28 409 409 Top = 184 410 Width = 786410 Width = 512 411 411 Anchors = [akTop, akLeft, akRight] 412 412 TabOrder = 12 413 413 end 414 414 object ButtonImageBrowse: TButton 415 Left = 938415 Left = 664 416 416 Height = 25 417 417 Top = 192 … … 460 460 object TabSheet3: TTabSheet 461 461 Caption = 'Rules' 462 ClientHeight = 297463 ClientWidth = 7 59462 ClientHeight = 428 463 ClientWidth = 779 464 464 object RadioGroupGrowCells: TRadioGroup 465 465 Left = 15 … … 534 534 Height = 27 535 535 Top = 24 536 Width = 599536 Width = 619 537 537 Anchors = [akTop, akLeft, akRight] 538 538 AutoSize = False … … 540 540 TabOrder = 3 541 541 end 542 object Label13: TLabel 543 Left = 8 544 Height = 20 545 Top = 280 546 Width = 111 547 Caption = 'Number of turns:' 548 ParentColor = False 549 end 550 object SpinEditTurns: TSpinEdit 551 Left = 236 552 Height = 28 553 Top = 278 554 Width = 159 555 MaxValue = 1000 556 MinValue = 1 557 TabOrder = 4 558 Value = 1 559 end 542 560 end 543 561 end … … 545 563 Left = 0 546 564 Height = 45 547 Top = 7 98548 Width = 1069565 Top = 703 566 Width = 795 549 567 Align = alBottom 550 568 BevelOuter = bvNone 551 569 ClientHeight = 45 552 ClientWidth = 1069570 ClientWidth = 795 553 571 TabOrder = 1 554 572 object ButtonOk: TButton 555 Left = 881573 Left = 607 556 574 Height = 25 557 575 Top = 6 … … 563 581 end 564 582 object ButtonCancel: TButton 565 Left = 985583 Left = 711 566 584 Height = 25 567 585 Top = 6 … … 576 594 Left = 0 577 595 Height = 228 578 Top = 570579 Width = 1069596 Top = 475 597 Width = 795 580 598 Align = alBottom 581 599 BevelOuter = bvNone … … 586 604 Left = 0 587 605 Height = 6 588 Top = 564589 Width = 1069606 Top = 469 607 Width = 795 590 608 Align = alBottom 591 609 ResizeAnchor = akBottom -
trunk/Forms/UFormNew.pas
r196 r197 45 45 Label11: TLabel; 46 46 Label12: TLabel; 47 Label13: TLabel; 47 48 Label2: TLabel; 48 49 Label3: TLabel; … … 72 73 RadioGroupGrowAmount: TRadioGroup; 73 74 RadioGroupGrowCells: TRadioGroup; 75 SpinEditTurns: TSpinEdit; 74 76 SpinEditMaxPower: TSpinEdit; 75 77 SpinEditServerPort: TSpinEdit; … … 501 503 SpinEditServerPort.Value := LocalNetworkPort; 502 504 SpinEditMaxPower.Value := Game.MaxPower; 505 SpinEditTurns.Value := Game.StayAliveForDefinedTurns; 503 506 end; 504 507 end; … … 536 539 Game.BridgeEnabled := CheckBoxBridges.Checked; 537 540 Game.MaxPower := SpinEditMaxPower.Value; 541 Game.StayAliveForDefinedTurns := SpinEditTurns.Value; 538 542 end; 539 543 end; -
trunk/Languages/xtactics.cs.po
r196 r197 399 399 msgstr "Adresa:" 400 400 401 #: tformnew.label13.caption 402 msgid "Number of turns:" 403 msgstr "Počet tahů:" 404 401 405 #: tformnew.label2.caption 402 406 #| msgid "x" … … 710 714 msgid "Not all players were initialized with start cell. Needed %d, initialized %d. Change map parameters to have more terrain cells." 711 715 msgstr "Ne všichni hráči byli vytvoření. Potřeba %d, vytvořeno %d. Změňte parametry mapy abyste měli více políček země." 716 717 #: ucore.splayerswins 718 msgid "Players %s win" 719 msgstr "Hráči %s vyhráli" 712 720 713 721 #: ucore.splayerwins … … 939 947 #: uvarblockserializer.serrorgetvarsize 940 948 msgid "Error reading variable block size" 941 msgstr " "949 msgstr "Chyba čtení velikosti délkou proměnného bloku" 942 950 943 951 #: uvarblockserializer.smaskedvaluereaderror 944 952 msgid "Error reading masked variable length block." 945 msgstr " "953 msgstr "Chyba čtení maskovaného délkou proměnného bloku" 946 954 947 955 #: uvarblockserializer.sreaderror 948 956 msgid "Stream read error. Expected length %d, read %d. Source stream size %d." 949 msgstr " "957 msgstr "Chyba čtení proudu: Očekávaná délka %d, přečteno %d. Zdrojový proud %d." 950 958 951 959 #: uvarblockserializer.suint64overflow 952 960 msgid "64-bit UInt read overflow." 953 msgstr " "961 msgstr "Přetečení při čtení 64-bit UInt" -
trunk/Languages/xtactics.po
r196 r197 385 385 msgstr "" 386 386 387 #: tformnew.label13.caption 388 msgid "Number of turns:" 389 msgstr "" 390 387 391 #: tformnew.label2.caption 388 392 msgid "Map height:" … … 694 698 #: ucore.splayersnotinitialized 695 699 msgid "Not all players were initialized with start cell. Needed %d, initialized %d. Change map parameters to have more terrain cells." 700 msgstr "" 701 702 #: ucore.splayerswins 703 msgid "Players %s win" 696 704 msgstr "" 697 705 -
trunk/UCore.lfm
r194 r197 10 10 object ActionList1: TActionList 11 11 Images = ImageListSmall 12 left = 11 312 left = 114 13 13 top = 50 14 14 object AExit: TAction -
trunk/UCore.pas
r196 r197 116 116 resourcestring 117 117 SPlayerWins = 'Player %s wins'; 118 SPlayersWins = 'Players %s win'; 118 119 SEndGame = 'End game?'; 119 120 SEndGameQuestion = 'Do you want to end current game?'; … … 127 128 128 129 procedure TCore.DoOnWin(Player: TPlayer); 130 var 131 PlayerNames: string; 132 AlivePlayers: TPlayerArray; 133 I: Integer; 129 134 begin 130 135 RedrawClients; 131 ShowMessage(Format(SPlayerWins, [Player.Name])); 136 if Assigned(Player) then 137 ShowMessage(Format(SPlayerWins, [Player.Name])) 138 else begin 139 AlivePlayers := Game.Players.GetAlivePlayers; 140 PlayerNames := ''; 141 for I := 0 to Length(AlivePlayers) - 1 do begin 142 if I > 0 then PlayerNames := PlayerNames + ', '; 143 PlayerNames := PlayerNames + AlivePlayers[I].Name; 144 end; 145 ShowMessage(Format(SPlayersWins, [PlayerNames])) 146 end; 132 147 end; 133 148 … … 407 422 FreeAndNil(StoredDimension); 408 423 FreeAndNil(Server); 424 FreeAndNil(Clients); 409 425 FreeAndNil(Game); 410 FreeAndNil(Clients);411 426 end; 412 427 -
trunk/UGame.pas
r194 r197 3206 3206 SetValue(DOMString(Path + '/GrowCells'), Integer(GrowCells)); 3207 3207 SetValue(DOMString(Path + '/WinObjective'), Integer(WinObjective)); 3208 SetValue(DOMString(Path + '/StayAliveForDefinedTurns'), StayAliveForDefinedTurns); 3208 3209 PlayersSetting.SaveConfig(Config, Path + '/Players'); 3209 3210 end; … … 3238 3239 if (Value >= Integer(Low(TWinObjective))) and (Value <= Integer(High(TWinObjective))) then 3239 3240 WinObjective := TWinObjective(Value) else WinObjective := Low(TWinObjective); 3241 StayAliveForDefinedTurns := GetValue(DOMString(Path + '/StayAliveForDefinedTurns'), 20); 3240 3242 PlayersSetting.LoadConfig(Config, Path + '/Players'); 3241 3243 end; … … 3431 3433 end else 3432 3434 if WinObjective = woStayAliveForDefinedTurns then begin 3433 // TODO: Not only one can win but multiple human players can survive.3434 3435 if TurnCounter > StayAliveForDefinedTurns then 3435 3436 EndGame(nil); … … 3522 3523 begin 3523 3524 Running := False; 3524 if Assigned(OnWin) and Assigned(Winner)then OnWin(Winner);3525 if Assigned(OnWin) then OnWin(Winner); 3525 3526 end; 3526 3527
Note:
See TracChangeset
for help on using the changeset viewer.