diff options
author | rexim <reximkut@gmail.com> | 2024-03-24 00:49:12 +0700 |
---|---|---|
committer | rexim <reximkut@gmail.com> | 2024-03-24 00:49:12 +0700 |
commit | db659865c1cf6ea44989b0604cbe4df535208363 (patch) | |
tree | 47f1e88c23d822bebfd501d8a6501ac16c2c4afe | |
parent | 396c80a13928859ce3d447ec84226b297dfaa3ce (diff) |
Set Window Icon
-rwxr-xr-x | build-linux.sh | 4 | ||||
-rw-r--r-- | eepers.adb | 5 | ||||
-rw-r--r-- | 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 @@ -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?) @@ -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; |