Skip to content

Commit f68dd75

Browse files
committed
Toggle fullscreen with F11 or Alt+Enter
1 parent 0252eb2 commit f68dd75

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

eepers.adb

+5-2
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,11 @@ begin
15021502
TURN_DURATION_SECS := BASE_TURN_DURATION_SECS;
15031503
end if;
15041504
end if;
1505-
1505+
1506+
if Is_Key_Pressed(KEY_F11) or (Is_Key_Down(KEY_LEFT_ALT) and Is_Key_Pressed(KEY_ENTER)) then
1507+
Toggle_Fullscreen;
1508+
end if;
1509+
15061510
Any_Key_Pressed := False;
15071511
while not Any_Key_Pressed and then Get_Key_Pressed /= KEY_NULL loop
15081512
Any_Key_Pressed := True;
@@ -1653,7 +1657,6 @@ end;
16531657
-- TODO: Mother should require several attacks before being "split"
16541658
-- TODO: Enemies should attack on zero just like a bomb.
16551659
-- TODO: Properly disablable DEV features
1656-
-- TODO: Fullscreen mode
16571660
-- TODO: Try MSAA (if too slow, don't)
16581661
-- TODO: Show Eeper Cooldown timer outside of the screen somehow
16591662
-- TODO: Visual Clue that the Eeper is about to kill the Player when Completely outside of the Screen

raylib.ads

+9-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ package Raylib is
1313
Import => True,
1414
Convention => C,
1515
External_Name => "CloseWindow";
16+
procedure Toggle_Fullscreen
17+
with
18+
Import => True,
19+
Convention => C,
20+
External_Name => "ToggleFullscreen";
21+
1622
function Window_Should_Close return C_Bool
1723
with
1824
Import => True,
@@ -77,9 +83,11 @@ package Raylib is
7783
KEY_UP: constant int := 265;
7884
KEY_SPACE: constant int := 32;
7985
KEY_ESCAPE: constant int := 256;
80-
KEY_ENTER: constant Int := 257;
86+
KEY_F11: constant Int := 300;
87+
KEY_ENTER: constant Int := 257;
8188
KEY_LEFT_SHIFT: constant Int := 340;
8289
KEY_RIGHT_SHIFT: constant Int := 344;
90+
KEY_LEFT_ALT: constant Int := 342;
8391

8492
function Is_Key_Pressed(key: int) return C_bool
8593
with

0 commit comments

Comments
 (0)