Changeset 327
- Timestamp:
- Jul 16, 2024, 10:58:45 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Core.pas
r319 r327 71 71 GameLoaded: Boolean; 72 72 FormNewTabIndex: Integer; 73 FullScreen: Boolean;74 73 GameFilesDir: string; 75 74 procedure LoadRecentExecute(Sender: TObject); … … 87 86 procedure FormClientActions; 88 87 procedure LoadGameSystems; 89 procedure ToggleFullscreen;90 88 public 91 89 Game: TGame; … … 294 292 procedure TCore.UpdateInterface; 295 293 begin 296 Core.AGameEnd.Enabled := Core.Game.Running; 294 Core.AGameEnd.Enabled := Game.Running; 295 Core.AFullscreen.Checked := FormMain.FullScreen; 297 296 end; 298 297 … … 306 305 procedure TCore.AFullscreenExecute(Sender: TObject); 307 306 begin 308 ToggleFullscreen; 307 FormMain.ToggleFullscreen; 308 UpdateInterface; 309 309 end; 310 310 … … 657 657 end; 658 658 659 procedure TCore.ToggleFullscreen;660 begin661 FullScreen := not FullScreen;662 PersistentForm1.Form := FormMain;663 PersistentForm1.SetFullScreen(FullScreen);664 UpdateInterface;665 end;666 667 659 procedure TCore.ReopenGameOnInit; 668 660 begin -
trunk/Forms/FormMain.pas
r319 r327 90 90 FormActivated: Boolean; 91 91 FormShown: Boolean; 92 FullScreen: Boolean;93 92 procedure ApplicationStart(Ptr: IntPtr); 94 93 procedure UpdateClientForms; … … 99 98 FormUnitMoves: TFormUnitMoves; 100 99 FormCharts: TFormCharts; 100 FullScreen: Boolean; 101 101 procedure LoadConfig(Config: TXmlConfig; Path: string); 102 102 procedure SaveConfig(Config: TXmlConfig; Path: string); 103 103 procedure ReloadView; 104 procedure ToggleFullscreen; 104 105 end; 105 106 … … 167 168 end; 168 169 ToolBar1.Visible := AToolBarVisible.Checked; 170 end; 171 172 procedure TFormMain.ToggleFullscreen; 173 begin 174 FullScreen := not FullScreen; 175 TFormEx.PersistentForm.Form := Self; 176 TFormEx.PersistentForm.SetFullScreen(FullScreen); 169 177 end; 170 178 … … 287 295 AUnitShapeVisible.Checked := Core.Core.UnitShapeVisible; 288 296 Core.Core.ScaleDPI; 297 Core.Core.PersistentForm1.Load(Self); 289 298 FullScreen := Core.Core.PersistentForm1.FormFullScreen; 290 299 Core.Core.Init;
Note:
See TracChangeset
for help on using the changeset viewer.