2016-03-18 11:36:04 +00:00
|
|
|
{{DISPLAYTITLE:_FULLSCREEN}}
|
2017-10-10 14:55:21 +00:00
|
|
|
The [[_FULLSCREEN]] statement attempts to make the program window fullscreen.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageSyntax}}
|
2017-10-10 14:55:21 +00:00
|
|
|
:[[_FULLSCREEN]] [''_STRETCH | _SQUAREPIXELS| _OFF''][, ''_SMOOTH'']
|
2016-03-18 11:36:04 +00:00
|
|
|
|
|
|
|
|
2021-02-28 14:47:33 +00:00
|
|
|
{{PageParameters}}
|
2016-03-18 11:36:04 +00:00
|
|
|
* {{Parameter|_STRETCH}} default first choice attempts to mimic QBasic's full screens if possible. [[_FULLSCREEN (function)]] returns 1.
|
|
|
|
* {{Parameter|_SQUAREPIXELS}} alternate choice enlarges the pixels into squares on some monitors. [[_FULLSCREEN (function)|_FULLSCREEN]] returns 2
|
|
|
|
* {{Parameter|_OFF}} turns _FULLSCREEN off after full screen has been enabled. [[_FULLSCREEN (function)]] returns 0.
|
2017-10-10 14:55:21 +00:00
|
|
|
* Second optional parameter ''_SMOOTH'' applies antialiasing to the stretched screen.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageDescription}}
|
2017-10-10 14:55:21 +00:00
|
|
|
* '''Set the [[SCREEN]] mode and text [[WIDTH]] when necessary first.''' Otherwise there may be desktop view issues.
|
|
|
|
* _FULLSCREEN with no parameters chooses {{Parameter|_STRETCH}} or {{Parameter|_SQUAREPIXELS}} (prioritizes _STRETCH to mimic QBasic if possible)
|
|
|
|
* '''Check the fullscreen mode with the [[_FULLSCREEN (function)|_FULLSCREEN]] function in your programs when a method is required.
|
2016-03-18 11:36:04 +00:00
|
|
|
* It is advisable to get [[INPUT|input]] from the user to confirm that fullscreen was completed or there were possible monitor incompatibilities.
|
2017-10-10 14:55:21 +00:00
|
|
|
* If fullscreen is '''not confirmed''' with a [[_FULLSCREEN (function)]] return '''greater than 0''', then disable with '''_FULLSCREEN _OFF'''.
|
|
|
|
* '''NOTE:''' _FULLSCREEN can also be affected by custom [[_FONT]] size settings and make program screens too large.
|
2016-03-18 11:36:04 +00:00
|
|
|
|
|
|
|
|
2017-10-10 14:55:21 +00:00
|
|
|
{{PageExamples}}
|
2016-03-18 11:36:04 +00:00
|
|
|
''Example 1:'' Setting the screen mode first prevents enlargement of the desktop before the program window is set:
|
|
|
|
{{CodeStart}}
|
|
|
|
{{Cl|SCREEN}} 12
|
|
|
|
{{Cl|_FULLSCREEN}}
|
|
|
|
{{Cl|IF...THEN|IF}} {{Cl|_FULLSCREEN (function)|_FULLSCREEN}} = 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _OFF 'check that a full screen mode initialized
|
|
|
|
|
|
|
|
{{Cl|LINE}} (100, 100)-(500, 400), 13, BF
|
|
|
|
{{CodeEnd}}
|
|
|
|
|
|
|
|
|
|
|
|
''Example 2:'' How fonts and _FULLSCREEN affect the program's window size.
|
2015-08-02 12:12:44 +00:00
|
|
|
{{CodeStart}}
|
|
|
|
'' ''
|
|
|
|
{{Cl|SCREEN (statement)|SCREEN}} 0
|
|
|
|
{{Cl|DO}}
|
|
|
|
{{Cl|PRINT}}
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|LINE INPUT}} "Enter MODE 1) ENLARGE WINDOW 2) FULL _SQUAREPIXELS 3) FULL _STRETCH: ", WMODE$
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|PRINT}}
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|IF}} WMODE$ = "1" {{Cl|THEN}} {{Cl|INPUT (file mode)|INPUT}} "SIZE 1 {{Cl|TO}} 9: ", ENLARGE%
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
{{Cl|SELECT CASE}} ENLARGE%
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|CASE}} 1, 2, 3, 4, 5: STYLE$ = "MONOSPACE, BOLD"
|
|
|
|
{{Cl|CASE}} 6, 7, 8, 9: STYLE$ = "MONOSPACE"
|
|
|
|
{{Cl|CASE ELSE}}: STYLE$ = "MONOSPACE"
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|END SELECT}}
|
|
|
|
|
|
|
|
{{Cl|SELECT CASE}} WMODE$
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|CASE}} "1"
|
2015-08-02 12:12:44 +00:00
|
|
|
full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|IF}} full > 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _OFF
|
|
|
|
f& = {{Cl|_LOADFONT}}("c:\windows\fonts\lucon.ttf", 13 + ENLARGE%, STYLE$)
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|_FONT}} f&
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|CASE}} "2"
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|_FULLSCREEN}} _SQUAREPIXELS
|
|
|
|
full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
|
|
|
|
{{Cl|IF}} full = 0 {{Cl|THEN}} {{Cl|GOSUB}} FCHECK
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|CASE}} "3"
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|_FULLSCREEN}} _STRETCH
|
|
|
|
full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
|
|
|
|
{{Cl|IF}} full = 0 {{Cl|THEN}} {{Cl|GOSUB}} FCHECK
|
|
|
|
{{Cl|END SELECT}}
|
|
|
|
|
|
|
|
mode = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
|
|
|
|
{{Cl|PRINT}}
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|PRINT}} "_FULLSCREEN mode ="; mode,
|
|
|
|
{{Cl|PRINT}} "PRESS ESC {{Cl|TO}} {{Cl|END}} {{Cl|OR}} ENTER {{Cl|TO}} CONTINUE..."
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
{{Cl|DO}}: {{Cl|SLEEP}}: B$ = {{Cl|INKEY$}}: {{Cl|LOOP}} {{Cl|UNTIL}} B$ = {{Cl|CHR$}}(13) {{Cl|OR}} B$ = {{Cl|CHR$}}(27)
|
|
|
|
|
|
|
|
{{Cl|GOSUB}} ClearFont
|
|
|
|
|
|
|
|
{{Cl|LOOP}} {{Cl|UNTIL}} B$ = {{Cl|CHR$}}(27)
|
|
|
|
ClearFont
|
|
|
|
{{Cl|END}}
|
|
|
|
|
|
|
|
FCHECK:
|
|
|
|
Z3 = timer
|
|
|
|
{{Cl|DO}}
|
|
|
|
{{Cl|IF}} {{Cl|TIMER (statement)|TIMER }}< Z3 {{Cl|THEN}} Z3 = Z3 - {{Cl|TIMER}}
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|IF}} {{Cl|TIMER (statement)|TIMER }}- Z3 > 4 {{Cl|THEN}} {{Cl|EXIT DO}}
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|LOOP}}
|
|
|
|
full = {{Cl|_FULLSCREEN (function)|_FULLSCREEN}}
|
|
|
|
{{Cl|IF}} full = 0 {{Cl|THEN}} {{Cl|_FULLSCREEN}} _{{Cl|OFF}}: {{Cl|SOUND}} 100, .75
|
|
|
|
{{Cl|RETURN}}
|
|
|
|
|
|
|
|
ClearFont:
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|IF}} f& > 0 {{Cl|THEN}}
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|_FONT}} 16 'select inbuilt 8x16 default font
|
|
|
|
{{Cl|_FREEFONT}} f&
|
|
|
|
{{Cl|END IF}}
|
|
|
|
{{Cl|RETURN}}
|
|
|
|
|
|
|
|
{{CodeEnd}}
|
|
|
|
|
|
|
|
|
2017-10-10 14:55:21 +00:00
|
|
|
''Example 3:'' Testing all fullscreen methods.
|
|
|
|
{{CodeStart}}
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|PRINT}} "Hello, world!"
|
|
|
|
{{Cl|PRINT}} "Hit 1 for windowed mode;
|
|
|
|
{{Cl|PRINT}} " 2 for _STRETCH"
|
|
|
|
{{Cl|PRINT}} " 3 for _SQUAREPIXELS"
|
|
|
|
{{Cl|PRINT}} " 4 for _STRETCH, _SMOOTH"
|
|
|
|
{{Cl|PRINT}} " 5 for _SQUAREPIXELS, _SMOOTH"
|
2017-10-10 14:55:21 +00:00
|
|
|
{{Cl|DO}}
|
|
|
|
k$ = {{Cl|INKEY$}}
|
|
|
|
{{Cl|SELECT CASE}} {{Cl|VAL}}(k$)
|
|
|
|
{{Cl|CASE}} 1
|
|
|
|
{{Cl|_FULLSCREEN}} _OFF
|
|
|
|
{{Cl|CASE}} 2
|
|
|
|
{{Cl|_FULLSCREEN}} _STRETCH
|
|
|
|
{{Cl|CASE}} 3
|
|
|
|
{{Cl|_FULLSCREEN}} _SQUAREPIXELS
|
|
|
|
{{Cl|CASE}} 4
|
|
|
|
{{Cl|_FULLSCREEN}} _STRETCH, _SMOOTH
|
|
|
|
{{Cl|CASE}} 5
|
|
|
|
{{Cl|_FULLSCREEN}} _SQUAREPIXELS, _SMOOTH
|
2021-01-24 03:36:34 +00:00
|
|
|
{{Cl|END SELECT}}
|
2017-10-10 14:55:21 +00:00
|
|
|
{{Cl|_LIMIT}} 30
|
|
|
|
{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|_EXIT (function)|_EXIT}}
|
|
|
|
{{Cl|SYSTEM}}{{CodeEnd}}
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
|
|
* [[_FULLSCREEN (function)]]
|
2021-01-04 18:45:32 +00:00
|
|
|
* [[_ALLOWFULLSCREEN]]
|
2016-03-18 11:36:04 +00:00
|
|
|
* [[_FONT]], [[SCREEN]]
|
|
|
|
* [[_SCREENIMAGE]]
|
2015-08-02 12:12:44 +00:00
|
|
|
* [[_SCREENMOVE]], [[_SCREENX]], [[_SCREENY]]
|
|
|
|
|
|
|
|
|
2019-04-15 01:15:33 +00:00
|
|
|
{{PageNavigation}}
|