Changeset 265 for trunk/Forms
- Timestamp:
- Jan 15, 2019, 1:03:40 AM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.lfm
r249 r265 13 13 OnKeyUp = FormKeyUp 14 14 OnShow = FormShow 15 LCLVersion = '1.8. 2.0'15 LCLVersion = '1.8.4.0' 16 16 WindowState = wsMaximized 17 17 object StatusBar1: TStatusBar 18 18 Left = 0 19 Height = 3020 Top = 59 119 Height = 28 20 Top = 593 21 21 Width = 775 22 22 Panels = < … … 34 34 object ToolBar1: TToolBar 35 35 Left = 0 36 Height = 59 136 Height = 593 37 37 Top = 0 38 38 Width = 32 … … 80 80 object PaintBox1: TPaintBox 81 81 Left = 32 82 Height = 59 182 Height = 593 83 83 Top = 0 84 84 Width = 743 -
trunk/Forms/UFormClient.pas
r249 r265 152 152 FormMove.TrackBarRepeat.Max := FormMove.SpinEditRepeat.MaxValue; 153 153 FormMove.TrackBarRepeat.Position := FormMove.SpinEditRepeat.Value; 154 FormMove.DefendCount := CellTo.MapCell.Power; 154 if Assigned(CellTo.MapCell.OneUnit) then 155 FormMove.DefendCount := CellTo.MapCell.OneUnit.Power 156 else FormMove.DefendCount := 0; 155 157 // Attack count from other surrounding cells without current move if already exists 156 158 FormMove.AttackCount := 0; -
trunk/Forms/UFormNew.lfm
r263 r265 15 15 OnShow = FormShow 16 16 Position = poMainFormCenter 17 LCLVersion = '1.8. 2.0'17 LCLVersion = '1.8.4.0' 18 18 object PageControl1: TPageControl 19 19 Left = 4 … … 21 21 Top = 4 22 22 Width = 749 23 ActivePage = TabSheet Map23 ActivePage = TabSheetRules 24 24 Align = alClient 25 25 BorderSpacing.Around = 4 26 TabIndex = 226 TabIndex = 3 27 27 TabOrder = 0 28 28 object TabSheetMode: TTabSheet 29 29 Caption = 'Mode' 30 ClientHeight = 65 131 ClientWidth = 7 4330 ClientHeight = 655 31 ClientWidth = 739 32 32 object Panel3: TPanel 33 33 Left = 0 … … 113 113 item 114 114 Caption = 'Address' 115 Width = 21 4115 Width = 219 116 116 end> 117 117 MultiSelect = True … … 158 158 object TabSheetPlayers: TTabSheet 159 159 Caption = 'Players' 160 ClientHeight = 65 1161 ClientWidth = 7 43160 ClientHeight = 655 161 ClientWidth = 739 162 162 object Panel2: TPanel 163 163 Left = 0 164 Height = 65 1164 Height = 655 165 165 Top = 0 166 Width = 7 43166 Width = 739 167 167 Align = alClient 168 168 BevelOuter = bvNone 169 ClientHeight = 65 1170 ClientWidth = 7 43169 ClientHeight = 655 170 ClientWidth = 739 171 171 TabOrder = 0 172 172 object ListViewPlayers: TListView 173 173 Left = 4 174 Height = 60 1174 Height = 605 175 175 Top = 4 176 Width = 73 5176 Width = 731 177 177 Align = alTop 178 178 Anchors = [akTop, akLeft, akRight, akBottom] … … 212 212 Left = 16 213 213 Height = 25 214 Top = 61 3214 Top = 617 215 215 Width = 83 216 216 Action = APlayerAdd … … 221 221 Left = 120 222 222 Height = 25 223 Top = 61 3223 Top = 617 224 224 Width = 83 225 225 Action = APlayerModify … … 230 230 Left = 224 231 231 Height = 25 232 Top = 61 3232 Top = 617 233 233 Width = 83 234 234 Action = APlayerRemove … … 240 240 object TabSheetMap: TTabSheet 241 241 Caption = 'Map' 242 ClientHeight = 65 1243 ClientWidth = 7 43242 ClientHeight = 655 243 ClientWidth = 739 244 244 object Panel1: TPanel 245 245 Left = 0 246 Height = 65 1246 Height = 655 247 247 Top = 0 248 Width = 7 43248 Width = 739 249 249 Align = alClient 250 250 BevelOuter = bvNone 251 ClientHeight = 65 1252 ClientWidth = 7 43251 ClientHeight = 655 252 ClientWidth = 739 253 253 TabOrder = 0 254 254 object Label1: TLabel … … 270 270 object SpinEditMapSizeX: TSpinEdit 271 271 Left = 128 272 Height = 36272 Height = 43 273 273 Top = 4 274 274 Width = 98 … … 280 280 object SpinEditMapSizeY: TSpinEdit 281 281 Left = 128 282 Height = 36282 Height = 43 283 283 Top = 55 284 284 Width = 98 … … 290 290 object TrackBarSizeX: TTrackBar 291 291 Left = 240 292 Height = 47292 Height = 58 293 293 Top = 8 294 Width = 4 92294 Width = 488 295 295 Max = 100 296 296 Min = 2 … … 303 303 object TrackBarSizeY: TTrackBar 304 304 Left = 240 305 Height = 47305 Height = 58 306 306 Top = 49 307 Width = 4 92307 Width = 488 308 308 Max = 100 309 309 Min = 2 … … 324 324 object ComboBoxGridType: TComboBox 325 325 Left = 146 326 Height = 36326 Height = 42 327 327 Top = 104 328 328 Width = 208 … … 340 340 object ComboBoxMapShape: TComboBox 341 341 Left = 146 342 Height = 36342 Height = 42 343 343 Top = 144 344 344 Width = 208 … … 365 365 Height = 27 366 366 Top = 110 367 Width = 25 5367 Width = 251 368 368 Anchors = [akTop, akLeft, akRight] 369 369 AutoSize = False … … 373 373 object SpinEditVoidPercent: TSpinEdit 374 374 Left = 216 375 Height = 36375 Height = 43 376 376 Top = 224 377 377 Width = 106 … … 384 384 Height = 30 385 385 Top = 232 386 Width = 18 7386 Width = 189 387 387 Caption = 'Inaccessible places' 388 388 OnChange = CheckBoxVoidChange … … 393 393 Height = 30 394 394 Top = 272 395 Width = 7 1395 Width = 73 396 396 Caption = 'Cities' 397 397 OnChange = CheckBoxCityChange … … 400 400 object SpinEditCityPercent: TSpinEdit 401 401 Left = 216 402 Height = 36402 Height = 43 403 403 Top = 272 404 404 Width = 106 … … 425 425 object SpinEditNeutralUnits: TSpinEdit 426 426 Left = 408 427 Height = 36427 Height = 43 428 428 Top = 384 429 429 Width = 98 … … 442 442 object EditImageFile: TEdit 443 443 Left = 144 444 Height = 36444 Height = 43 445 445 Top = 184 446 Width = 47 6446 Width = 472 447 447 Anchors = [akTop, akLeft, akRight] 448 448 TabOrder = 12 449 449 end 450 450 object ButtonImageBrowse: TButton 451 Left = 62 8451 Left = 624 452 452 Height = 25 453 453 Top = 192 … … 470 470 Height = 30 471 471 Top = 310 472 Width = 21 0472 Width = 212 473 473 Caption = 'Bridges between cells' 474 474 TabOrder = 14 … … 476 476 object SpinEditMaxPower: TSpinEdit 477 477 Left = 408 478 Height = 36478 Height = 43 479 479 Top = 344 480 480 Width = 98 … … 497 497 Height = 27 498 498 Top = 137 499 Width = 25 5499 Width = 251 500 500 Anchors = [akTop, akLeft, akRight] 501 501 AutoSize = False … … 507 507 object TabSheetRules: TTabSheet 508 508 Caption = 'Rules' 509 ClientHeight = 65 1510 ClientWidth = 7 43509 ClientHeight = 655 510 ClientWidth = 739 511 511 object Panel4: TPanel 512 512 Left = 0 513 Height = 65 1513 Height = 655 514 514 Top = 0 515 Width = 7 43515 Width = 739 516 516 Align = alClient 517 517 BevelOuter = bvNone 518 ClientHeight = 65 1519 ClientWidth = 7 43518 ClientHeight = 655 519 ClientWidth = 739 520 520 TabOrder = 0 521 521 object RadioGroupGrowCells: TRadioGroup … … 533 533 ChildSizing.Layout = cclLeftToRightThenTopToBottom 534 534 ChildSizing.ControlsPerLine = 1 535 ClientHeight = 7 7536 ClientWidth = 3 08535 ClientHeight = 78 536 ClientWidth = 310 537 537 Items.Strings = ( 538 538 'None' … … 552 552 object ComboBoxWinObjective: TComboBox 553 553 Left = 224 554 Height = 3 6554 Height = 38 555 555 Top = 244 556 556 Width = 328 … … 580 580 ChildSizing.Layout = cclLeftToRightThenTopToBottom 581 581 ChildSizing.ControlsPerLine = 1 582 ClientHeight = 4 8583 ClientWidth = 30 1582 ClientHeight = 49 583 ClientWidth = 303 584 584 Items.Strings = ( 585 585 'By one' … … 592 592 Height = 30 593 593 Top = 24 594 Width = 11 3594 Width = 115 595 595 Caption = 'Fog of war' 596 596 TabOrder = 3 … … 600 600 Height = 78 601 601 Top = 290 602 Width = 7 20602 Width = 716 603 603 ActivePage = TabSheetCaptureCities 604 604 Anchors = [akTop, akLeft, akRight] … … 611 611 end 612 612 object TabSheetCaptureCells: TTabSheet 613 ClientHeight = 7 2614 ClientWidth = 7 14613 ClientHeight = 74 614 ClientWidth = 706 615 615 object Label14: TLabel 616 616 Left = 8 … … 633 633 end 634 634 object TabSheetStayAliveTurns: TTabSheet 635 ClientHeight = 7 2636 ClientWidth = 7 14635 ClientHeight = 74 636 ClientWidth = 706 637 637 object Label13: TLabel 638 638 Left = 8 … … 659 659 Height = 30 660 660 Top = 62 661 Width = 36 0661 Width = 362 662 662 Caption = 'Set cells without player units as neutral' 663 663 TabOrder = 5 -
trunk/Forms/UFormNew.pas
r263 r265 163 163 SGridTypeRandom = 'Random'; 164 164 SGridTypeIsometric = 'Isometric'; 165 SWinObjectiveNone = 'None'; 165 166 SWinObjectiveDefeatAllOponents = 'Defeat all oponents'; 166 167 SWinObjectiveDefeatAllCities = 'Defeat all oponents cities'; 167 168 SWinObjectiveCapturePosition = 'Capture all special cells'; 168 169 SWinObjectiveStayAliveForTurns = 'Stay alive for number of turns'; 170 SWinObjectiveCaptureEntireMap = 'Capture entire map'; 169 171 SGrowNone = 'None'; 170 172 SGrowPlayerCities = 'Player cities'; … … 283 285 LastIndex := ItemIndex; 284 286 Clear; 287 Items.Add(SWinObjectiveNone); 285 288 Items.Add(SWinObjectiveDefeatAllOponents); 286 289 Items.Add(SWinObjectiveDefeatAllCities); 287 290 Items.Add(SWinObjectiveCapturePosition); 288 291 Items.Add(SWinObjectiveStayAliveForTurns); 292 Items.Add(SWinObjectiveCaptureEntireMap); 289 293 ItemIndex := LastIndex; 290 294 end; … … 327 331 procedure TFormNew.UpdateInterface; 328 332 begin 329 APlayerRemove.Enabled := Assigned(ListViewPlayers.Selected) and (Players.Count > 2);333 APlayerRemove.Enabled := Assigned(ListViewPlayers.Selected) and (Players.Count > MinPlayerCount); 330 334 APlayerAdd.Enabled := Players.Count < MaxPlayerCount; 331 335 APlayerModify.Enabled := Assigned(ListViewPlayers.Selected); … … 427 431 if ListViewPlayers.Items[I].Selected then begin 428 432 Players.Remove(ListViewPlayers.Items[I].Data); 433 if Players.Count <= MinPlayerCount then Break; 429 434 end; 430 435 ReloadView; … … 487 492 if Players.Count <= (MaxPlayerCount - 1) then begin 488 493 NewPlayer := TPlayer.Create; 489 NewPlayer.Id := Players.GetNew PlayerId;494 NewPlayer.Id := Players.GetNewId; 490 495 NewPlayer.Name := SPlayer + ' ' + IntToStr(NewPlayer.Id); 491 496 NewPlayer.Color := PlayerColors[Players.Count]; … … 539 544 SpinEditTurns.Value := StayAliveForDefinedTurns; 540 545 SpinEditSpecialCells.Value := SpecialCaptureCellCount; 541 CheckBoxEmptyCellsNeutral.Checked := EmptyCellsNeutral;546 CheckBoxEmptyCellsNeutral.Checked := GameSystem.EmptyCellsNeutral; 542 547 end; 543 548 end; … … 582 587 StayAliveForDefinedTurns := SpinEditTurns.Value; 583 588 SpecialCaptureCellCount := SpinEditSpecialCells.Value; 584 EmptyCellsNeutral := CheckBoxEmptyCellsNeutral.Checked;589 GameSystem.EmptyCellsNeutral := CheckBoxEmptyCellsNeutral.Checked; 585 590 end; 586 591 end;
Note:
See TracChangeset
for help on using the changeset viewer.