Changeset 213 for trunk/UCore.pas
- Timestamp:
- May 24, 2018, 9:25:17 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r211 r213 45 45 procedure AExitExecute(Sender: TObject); 46 46 procedure AGameEndExecute(Sender: TObject); 47 procedure AGameEndTurnExecute(Sender: TObject);48 47 procedure AGameLoadExecute(Sender: TObject); 49 48 procedure AGameNewExecute(Sender: TObject); … … 96 95 procedure SaveConfig; 97 96 procedure Spectate(Player: TPlayer); 98 procedure Update Actions;97 procedure UpdateInterface; 99 98 procedure ScaleDPI; 100 99 procedure Init; … … 250 249 end; 251 250 252 procedure TCore.Update Actions;251 procedure TCore.UpdateInterface; 253 252 begin 254 253 Core.AGameEnd.Enabled := Core.Game.Running; … … 276 275 Game.Running := False; 277 276 Server.GameEnd; 278 UpdateActions; 279 end; 280 end; 281 282 procedure TCore.AGameEndTurnExecute(Sender: TObject); 283 begin 284 277 UpdateInterface; 278 end; 285 279 end; 286 280 … … 302 296 FormNew.PageControl1.TabIndex := FormNewTabIndex; 303 297 if FormNew.ShowModal = mrOk then begin 298 Game.Running := False; 304 299 FormNew.Save(Server); 305 300 Game.Assign(GameSettings); … … 369 364 Game.SaveConfig(XMLConfig1, 'Game'); 370 365 Server.SaveConfig(XMLConfig1, 'Server'); 366 XMLConfig1.Flush; 371 367 end; 372 368 finally … … 457 453 // Create local LocalClients for human players 458 454 LocalClients.Clear; 455 FormClient.Client := nil; 459 456 for Player in Game.Players do 460 457 with Player do … … 484 481 SelectClient; 485 482 LastOpenedList1.AddItem(FileName); 486 with FormClient.Client do487 View.DestRect := TRect.CreateBounds(TPoint.Create(0, 0),488 TPoint.Create(FormClient.PaintBox1.Width, FormClient.PaintBox1.Height));489 483 FormClient.AZoomAll.Execute; 490 484 UpdateOtherForms; 491 Update Actions;485 UpdateInterface; 492 486 ServerClient := Server.Clients.SearchByPlayer(Game.CurrentPlayer); 493 487 if Assigned(ServerClient) then ServerClient.TurnStart … … 507 501 I: Integer; 508 502 begin 503 // Copy all actions from docked form to main form so keyboard shortcuts will be active 509 504 for I := 0 to FormClient.ActionList1.ActionCount - 1 do begin 510 505 Action := TAction.Create(FormMain); … … 539 534 // Create local LocalClients for human players 540 535 LocalClients.Clear; 536 FormClient.Client := nil; 541 537 for Player in Game.Players do 542 538 with Player do … … 569 565 else ShowMessage(Format(SPlayersNotInitialized, [Game.Players.Count, Game.Players.GetAliveCount])); 570 566 UpdateOtherForms; 571 Update Actions;567 UpdateInterface; 572 568 ServerClient := Server.Clients.SearchByPlayer(Game.CurrentPlayer); 573 569 if Assigned(ServerClient) then ServerClient.TurnStart … … 580 576 ServerClient: TServerClient; 581 577 begin 578 Application.ProcessMessages; 579 Server.NextPlayer; 582 580 if Assigned(Game.CurrentPlayer) then begin 583 581 if Game.CurrentPlayer.Mode = pmHuman then begin
Note:
See TracChangeset
for help on using the changeset viewer.