Skip to content

Commit cded84b

Browse files
committed
Toggle fullscreen with F11 or Alt+Enter
1 parent 602691a commit cded84b

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;
@@ -1656,7 +1660,6 @@ end;
16561660
-- TODO: Mother should require several attacks before being "split"
16571661
-- TODO: Enemies should attack on zero just like a bomb.
16581662
-- TODO: Properly disablable DEV features
1659-
-- TODO: Fullscreen mode
16601663
-- TODO: Try MSAA (if too slow, don't)
16611664
-- TODO: Show Eeper Cooldown timer outside of the screen somehow
16621665
-- 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,8 +83,10 @@ 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;
89+
KEY_LEFT_ALT: constant Int := 342;
8290

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

0 commit comments

Comments
 (0)