From db659865c1cf6ea44989b0604cbe4df535208363 Mon Sep 17 00:00:00 2001 From: rexim Date: Sun, 24 Mar 2024 00:49:12 +0700 Subject: Set Window Icon --- build-linux.sh | 4 ++-- eepers.adb | 5 ++++- raylib.ads | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build-linux.sh b/build-linux.sh index 0a51876..24e3683 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -2,8 +2,8 @@ set -xe -# gnatmake -f -O3 -Wall -Wextra -gnat2022 eepers.adb -bargs -static -largs -L./raylib/raylib-5.0_linux_amd64/lib/ -l:libraylib.a -lm -# ./eepers +gnatmake -f -O3 -Wall -Wextra -gnat2022 eepers.adb -bargs -static -largs -L./raylib/raylib-5.0_linux_amd64/lib/ -l:libraylib.a -lm +./eepers # gnatmake -f -Wall -Wextra -gnat2022 test.adb -largs -L./raylib/raylib-5.0_linux_amd64/lib/ -l:libraylib.a -lm # ./test diff --git a/eepers.adb b/eepers.adb index 130fc11..d6f8119 100644 --- a/eepers.adb +++ b/eepers.adb @@ -1359,14 +1359,18 @@ procedure Eepers is Palette_Editor_Choice: Palette := Palette'First; Palette_Editor_Selected: Boolean := False; Palette_Editor_Component: HSV_Comp := Hue; + Icon: Image; begin if not Change_Directory(Get_Application_Directory) then Put_Line("WARNING: Could not change working directory to the application directory"); end if; + Icon := Load_Image("assets/icon.png"); + Set_Config_Flags(FLAG_WINDOW_RESIZABLE); Init_Window(1600, 900, Title); + Set_Window_Icon(Icon); Set_Target_FPS(60); Set_Exit_Key(KEY_NULL); @@ -1551,7 +1555,6 @@ begin Close_Window; end; --- TODO: Window title icon -- TODO: Loop the music -- TODO: Sound on Finishing Round -- TODO: Footstep variation for Mother/Guard bosses (depending on the distance traveled?) diff --git a/raylib.ads b/raylib.ads index 77bf768..495a3f0 100644 --- a/raylib.ads +++ b/raylib.ads @@ -316,4 +316,9 @@ package Raylib is Import => True, Convention => C, External_Name => "SetSoundVolume"; + procedure Set_Window_Icon(Img: Image) + with + Import => True, + Convention => C, + External_Name => "SetWindowIcon"; end Raylib; -- cgit v1.2.3