Changeset 203 for trunk/UCore.pas
- Timestamp:
- May 18, 2018, 12:54:37 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r202 r203 17 17 TCore = class(TDataModule) 18 18 AAbout: TAction; 19 AGameSave: TAction; 19 20 APlayersStats: TAction; 20 21 ANewSpectatorClient: TAction; … … 22 23 AShowCharts: TAction; 23 24 AHelp: TAction; 24 AGameSave : TAction;25 AGameSaveAs: TAction; 25 26 AGameLoad: TAction; 26 27 ApplicationInfo: TApplicationInfo; … … 29 30 AExit: TAction; 30 31 AGameEnd: TAction; 31 AGameEndTurn: TAction;32 32 AGameNew: TAction; 33 33 AGameRestart: TAction; … … 48 48 procedure AGameNewExecute(Sender: TObject); 49 49 procedure AGameRestartExecute(Sender: TObject); 50 procedure AGameSaveAsExecute(Sender: TObject); 50 51 procedure AGameSaveExecute(Sender: TObject); 51 52 procedure AHelpExecute(Sender: TObject); … … 245 246 procedure TCore.UpdateActions; 246 247 begin 247 Core.AGameEndTurn.Enabled := Core.Game.Running;248 248 Core.AGameEnd.Enabled := Core.Game.Running; 249 249 end; … … 276 276 procedure TCore.AGameEndTurnExecute(Sender: TObject); 277 277 begin 278 Game.NextPlayer; 279 RedrawClients; 280 UpdateActions; 278 281 279 end; 282 280 … … 314 312 end; 315 313 316 procedure TCore.AGameSave Execute(Sender: TObject);314 procedure TCore.AGameSaveAsExecute(Sender: TObject); 317 315 begin 318 316 SaveDialog1.Filter := SFileDialogFilter; … … 323 321 LastOpenedList1.AddItem(SaveDialog1.FileName); 324 322 end; 323 end; 324 325 procedure TCore.AGameSaveExecute(Sender: TObject); 326 begin 327 if FileExists(Game.FileName) then 328 Game.SaveToFile(Game.FileName) 329 else AGameSave.Execute; 325 330 end; 326 331 … … 434 439 435 440 // Create local LocalClients for human players 441 LocalClients.Clear; 436 442 for Player in Game.Players do 437 443 with Player do … … 509 515 510 516 // Create local LocalClients for human players 517 LocalClients.Clear; 511 518 for Player in Game.Players do 512 519 with Player do
Note:
See TracChangeset
for help on using the changeset viewer.