Changeset 199 for trunk/Forms
- Timestamp:
- May 16, 2018, 2:48:57 PM (7 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormChat.lfm
r179 r199 8 8 ClientWidth = 527 9 9 DesignTimePPI = 120 10 LCLVersion = '1.8. 0.6'10 LCLVersion = '1.8.2.0' 11 11 object MemoChat: TMemo 12 12 Left = 8 -
trunk/Forms/UFormChat.pas
r185 r199 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 UGame, UGameClient , SpecializedList;9 UGame, UGameClient; 10 10 11 11 type -
trunk/Forms/UFormNew.pas
r198 r199 132 132 private 133 133 Players: TPlayers; 134 ServerList: TServerList; 134 135 public 135 ServerList: TServerList;136 136 procedure Translate; 137 137 procedure ReloadView; … … 334 334 AServerAdd.Enabled := RadioButtonModeNetworkClient.Checked; 335 335 AServerModify.Enabled := RadioButtonModeNetworkClient.Checked; 336 PageControl2.TabIndex := ComboBoxWinObjective.ItemIndex; 336 337 end; 337 338 … … 359 360 begin 360 361 Players := TPlayers.Create; 362 ServerList := TServerList.Create; 361 363 FormChat := TFormChat.Create(nil); 362 364 FormChat.ManualDock(PanelChat, nil, alClient); … … 383 385 procedure TFormNew.ComboBoxWinObjectiveChange(Sender: TObject); 384 386 begin 385 PageControl2.TabIndex := ComboBoxWinObjective.ItemIndex;387 UpdateInterface; 386 388 end; 387 389 … … 483 485 procedure TFormNew.FormDestroy(Sender: TObject); 484 486 begin 487 FreeAndNil(ServerList); 485 488 FreeAndNil(Players); 486 489 FreeAndNil(FormChat); … … 490 493 begin 491 494 with Server do begin 492 CheckBoxSymetricMap.Checked := Game.SymetricMap;493 CheckBoxVoid.Checked := Game.VoidEnabled;494 SpinEditVoidPercent.Value := Game.VoidPercentage;495 SpinEditVoidPercent.Enabled := Game.VoidEnabled;496 Players.Assign(Game.PlayersSetting);497 CheckBoxCity.Checked := Game.CityEnabled;498 SpinEditCityPercent.Value := Game.CityPercentage;499 SpinEditMapSizeX.Value := Game.Map.Size.X;500 SpinEditMapSizeY.Value := Game.Map.Size.Y;501 TrackBarSizeX.Position := Game.Map.Size.X;502 TrackBarSizeY.Position := Game.Map.Size.Y;503 RadioGroupGrowAmount.ItemIndex := Integer(Game.GrowAmount);504 RadioGroupGrowCells.ItemIndex := Integer(Game.GrowCells);505 ComboBoxGridType.ItemIndex := Integer(Game.MapType) - 1;506 ComboBoxWinObjective.ItemIndex := Integer(Game.WinObjective);507 SpinEditNeutralUnits.Value := Game.MaxNeutralUnits;508 ComboBoxMapShape.ItemIndex := Integer(Game.Map.Shape);509 EditImageFile.Text := Game.MapImageFileName;510 CheckBoxFogOfWar.Checked := Game.FogOfWar;511 CheckBoxBridges.Checked := Game.BridgeEnabled;512 495 RadioButtonModeLocal.Checked := Mode = smLocal; 513 496 RadioButtonModeNetworkClient.Checked := Mode = smNetworkClient; … … 515 498 EditServerAddress.Text := LocalNetworkAddress; 516 499 SpinEditServerPort.Value := LocalNetworkPort; 517 SpinEditMaxPower.Value := Game.MaxPower; 518 SpinEditTurns.Value := Game.StayAliveForDefinedTurns; 519 SpinEditSpecialCells.Value := Game.SpecialCaptureCellCount; 500 end; 501 ServerList.Assign(Core.ServerList); 502 Players.Assign(Core.GameSettings.Players); 503 with Core.GameSettings do begin 504 CheckBoxSymetricMap.Checked := SymetricMap; 505 CheckBoxVoid.Checked := VoidEnabled; 506 SpinEditVoidPercent.Value := VoidPercentage; 507 SpinEditVoidPercent.Enabled := VoidEnabled; 508 CheckBoxCity.Checked := CityEnabled; 509 SpinEditCityPercent.Value := CityPercentage; 510 SpinEditMapSizeX.Value := Map.Size.X; 511 SpinEditMapSizeY.Value := Map.Size.Y; 512 TrackBarSizeX.Position := Map.Size.X; 513 TrackBarSizeY.Position := Map.Size.Y; 514 RadioGroupGrowAmount.ItemIndex := Integer(GrowAmount); 515 RadioGroupGrowCells.ItemIndex := Integer(GrowCells); 516 ComboBoxGridType.ItemIndex := Integer(MapType) - 1; 517 ComboBoxWinObjective.ItemIndex := Integer(WinObjective); 518 SpinEditNeutralUnits.Value := MaxNeutralUnits; 519 ComboBoxMapShape.ItemIndex := Integer(Map.Shape); 520 EditImageFile.Text := MapImageFileName; 521 CheckBoxFogOfWar.Checked := FogOfWar; 522 CheckBoxBridges.Checked := BridgeEnabled; 523 SpinEditMaxPower.Value := MaxPower; 524 SpinEditTurns.Value := StayAliveForDefinedTurns; 525 SpinEditSpecialCells.Value := SpecialCaptureCellCount; 520 526 end; 521 527 end; … … 536 542 RemoteNetworkPort := 0; 537 543 end; 538 Game.PlayersSetting.Assign(Players); 539 Game.SymetricMap := CheckBoxSymetricMap.Checked; 540 Game.VoidEnabled := CheckBoxVoid.Checked; 541 Game.VoidPercentage := SpinEditVoidPercent.Value; 542 Game.CityEnabled := CheckBoxCity.Checked; 543 Game.CityPercentage := SpinEditCityPercent.Value; 544 Game.Map.Size := TPoint.Create(SpinEditMapSizeX.Value, SpinEditMapSizeY.Value); 545 Game.GrowAmount := TGrowAmount(RadioGroupGrowAmount.ItemIndex); 546 Game.GrowCells := TGrowCells(RadioGroupGrowCells.ItemIndex); 547 Game.MapType := TMapType(ComboBoxGridType.ItemIndex + 1); 548 Game.WinObjective := TWinObjective(ComboBoxWinObjective.ItemIndex); 549 Game.MaxNeutralUnits := SpinEditNeutralUnits.Value; 550 Game.Map.Shape := TMapShape(ComboBoxMapShape.ItemIndex); 551 Game.MapImageFileName := EditImageFile.Text; 552 Game.FogOfWar := CheckBoxFogOfWar.Checked; 553 Game.BridgeEnabled := CheckBoxBridges.Checked; 554 Game.MaxPower := SpinEditMaxPower.Value; 555 Game.StayAliveForDefinedTurns := SpinEditTurns.Value; 556 Game.SpecialCaptureCellCount := SpinEditSpecialCells.Value; 544 end; 545 Core.GameSettings.Players.Assign(Players); 546 Core.ServerList.Assign(ServerList); 547 with Core.GameSettings do begin 548 SymetricMap := CheckBoxSymetricMap.Checked; 549 VoidEnabled := CheckBoxVoid.Checked; 550 VoidPercentage := SpinEditVoidPercent.Value; 551 CityEnabled := CheckBoxCity.Checked; 552 CityPercentage := SpinEditCityPercent.Value; 553 Map.Size := TPoint.Create(SpinEditMapSizeX.Value, SpinEditMapSizeY.Value); 554 GrowAmount := TGrowAmount(RadioGroupGrowAmount.ItemIndex); 555 GrowCells := TGrowCells(RadioGroupGrowCells.ItemIndex); 556 MapType := TMapType(ComboBoxGridType.ItemIndex + 1); 557 WinObjective := TWinObjective(ComboBoxWinObjective.ItemIndex); 558 MaxNeutralUnits := SpinEditNeutralUnits.Value; 559 Map.Shape := TMapShape(ComboBoxMapShape.ItemIndex); 560 MapImageFileName := EditImageFile.Text; 561 FogOfWar := CheckBoxFogOfWar.Checked; 562 BridgeEnabled := CheckBoxBridges.Checked; 563 MaxPower := SpinEditMaxPower.Value; 564 StayAliveForDefinedTurns := SpinEditTurns.Value; 565 SpecialCaptureCellCount := SpinEditSpecialCells.Value; 557 566 end; 558 567 end;
Note:
See TracChangeset
for help on using the changeset viewer.