Changeset 265 for trunk/Forms/UFormNew.pas
- Timestamp:
- Jan 15, 2019, 1:03:40 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.