Changeset 250 for trunk/UCore.pas
- Timestamp:
- Sep 22, 2018, 10:11:33 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r249 r250 17 17 TCore = class(TDataModule) 18 18 AAbout: TAction; 19 AFullscreen: TAction; 19 20 AToggleFogOfWar: TAction; 20 21 AShowKeyShortcuts: TAction; … … 46 47 procedure AAboutExecute(Sender: TObject); 47 48 procedure AExitExecute(Sender: TObject); 49 procedure AFullscreenExecute(Sender: TObject); 48 50 procedure AGameEndExecute(Sender: TObject); 49 51 procedure AGameLoadExecute(Sender: TObject); … … 70 72 GameLoaded: Boolean; 71 73 FormNewTabIndex: Integer; 74 OldWindowState: TWindowState; 75 InFullScreenMode: Boolean; 72 76 procedure LoadRecentExecute(Sender: TObject); 73 77 procedure StartNewGame; … … 273 277 end; 274 278 279 procedure TCore.AFullscreenExecute(Sender: TObject); 280 begin 281 if InFullScreenMode then begin 282 // Workaround: WindowState has sometimes wrong value under Linux. 283 // Try to switch fullscreen again before switching back. 284 if FormMain.WindowState <> wsFullScreen then begin 285 FormMain.WindowState := wsFullScreen; 286 end; 287 FormMain.WindowState := OldWindowState; 288 InFullScreenMode := False; 289 end else begin 290 OldWindowState := FormMain.WindowState; 291 FormMain.WindowState := wsFullScreen; 292 InFullScreenMode := True; 293 end; 294 end; 295 275 296 procedure TCore.AAboutExecute(Sender: TObject); 276 297 begin
Note:
See TracChangeset
for help on using the changeset viewer.