Changeset 304 for trunk/Forms/UFormNew.pas
- Timestamp:
- Aug 11, 2019, 4:53:05 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.