Browse Source

Fixed lower left corner bug, due to PNG mode, and added UI theme scroller...

master
parent
commit
292500e7da
5 changed files with 9 additions and 9 deletions
  1. +1
    -1
      source/core.adb
  2. +2
    -4
      source/main.adb
  3. +4
    -3
      source/ui.adb
  4. +2
    -1
      source/ui.ads
  5. BIN
      sprite/ui/main/corner_lower_left.png

+ 1
- 1
source/core.adb View File

@@ -240,7 +240,7 @@ package body core is
engine_active := true;
texture_array := new texture_data_array (0 .. 1600);
sound_array := new sound_data_array (0 .. 4);
font_array := new font_data_array (0 .. 4);
font_array := new font_data_array (0 .. 8);
--
echo (comment, "-- Setting trace log level to none (ignoring all default Raylib logs).");
ray.set_trace_log_level (ray.log_none);


+ 2
- 4
source/main.adb View File

@@ -76,8 +76,7 @@ procedure main is
procedure show_unit_menu is begin menu_insert (menu_unit); end show_unit_menu;
procedure show_might_menu is begin menu_insert (menu_might); end show_might_menu;
procedure show_magic_menu is begin menu_insert (menu_magic); end show_magic_menu;
procedure ui_main_style is begin ui.active := ui.main; end ui_main_style;
procedure ui_steam_style is begin ui.active := ui.steam; end ui_steam_style;
procedure ui_main_style is begin ui.active := ui.style'val ((ui.style'pos (ui.active) + 1) mod 7); end ui_main_style;
procedure hide_top_menu is begin menu_remove; end hide_top_menu;
procedure zoom_in is begin core.zoom := 2; end zoom_in;
procedure zoom_out is begin core.zoom := 1; end zoom_out;
@@ -93,8 +92,7 @@ procedure main is
core.signal_u => show_unit_menu'access,
core.signal_m => show_might_menu'access,
core.signal_n => show_magic_menu'access,
core.signal_d => ui_main_style'access,
core.signal_f => ui_steam_style'access,
core.signal_v => ui_main_style'access,
core.signal_grave => hide_top_menu'access,
core.signal_kp_add => zoom_in'access,
core.signal_kp_subtract => zoom_out'access,


+ 4
- 3
source/ui.adb View File

@@ -135,14 +135,15 @@ package body ui is
glyphs (index) := core.import_font ("./sprite/ui/" & folder_path & "/font.png", 24, 0);
--
for this in element loop
sprite (index, this) := core.import_sprite ("./sprite/ui/" & folder_path & core.lowercase (element'image (this)) & ".png", 1, 1);
sprite (index, this) := core.import_sprite ("./sprite/ui/" & folder_path & "/" & core.lowercase (element'image (this)) & ".png", 1, 1);
end loop;
end load_ui;
begin
core.echo (core.comment, "Configuring UI components...");
--
load_ui (main, "main/");
load_ui (steam, "steam/");
for index in style loop
load_ui (index, core.lowercase (style'image (index)));
end loop;
end configure;

------------------------------------------------------------------------------------------


+ 2
- 1
source/ui.ads View File

@@ -9,7 +9,8 @@ package ui is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type style is (
main, steam
main,
fairy, dwarf, gnoll, kobold, goblin, imp
);

------------------------------------------------------------------------------------------


BIN
sprite/ui/main/corner_lower_left.png View File

Before After
Width: 64  |  Height: 64  |  Size: 468B Width: 64  |  Height: 64  |  Size: 688B

Loading…
Cancel
Save