Skip to content

Commit

Permalink
Toggle fullscreen with F11 or Alt+Enter
Browse files Browse the repository at this point in the history
  • Loading branch information
jiffygist committed Mar 26, 2024
1 parent 0252eb2 commit f68dd75
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 5 additions & 2 deletions eepers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,11 @@ begin
TURN_DURATION_SECS := BASE_TURN_DURATION_SECS;
end if;
end if;


if Is_Key_Pressed(KEY_F11) or (Is_Key_Down(KEY_LEFT_ALT) and Is_Key_Pressed(KEY_ENTER)) then
Toggle_Fullscreen;
end if;

Any_Key_Pressed := False;
while not Any_Key_Pressed and then Get_Key_Pressed /= KEY_NULL loop
Any_Key_Pressed := True;
Expand Down Expand Up @@ -1653,7 +1657,6 @@ end;
-- TODO: Mother should require several attacks before being "split"
-- TODO: Enemies should attack on zero just like a bomb.
-- TODO: Properly disablable DEV features
-- TODO: Fullscreen mode
-- TODO: Try MSAA (if too slow, don't)
-- TODO: Show Eeper Cooldown timer outside of the screen somehow
-- TODO: Visual Clue that the Eeper is about to kill the Player when Completely outside of the Screen
Expand Down
10 changes: 9 additions & 1 deletion raylib.ads
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ package Raylib is
Import => True,
Convention => C,
External_Name => "CloseWindow";
procedure Toggle_Fullscreen
with
Import => True,
Convention => C,
External_Name => "ToggleFullscreen";

function Window_Should_Close return C_Bool
with
Import => True,
Expand Down Expand Up @@ -77,9 +83,11 @@ package Raylib is
KEY_UP: constant int := 265;
KEY_SPACE: constant int := 32;
KEY_ESCAPE: constant int := 256;
KEY_ENTER: constant Int := 257;
KEY_F11: constant Int := 300;
KEY_ENTER: constant Int := 257;
KEY_LEFT_SHIFT: constant Int := 340;
KEY_RIGHT_SHIFT: constant Int := 344;
KEY_LEFT_ALT: constant Int := 342;

function Is_Key_Pressed(key: int) return C_bool
with
Expand Down

0 comments on commit f68dd75

Please sign in to comment.