Fixed lower left corner bug, due to PNG mode, and added UI theme scroller...
This commit is contained in:
parent
48b17e09d4
commit
292500e7da
@ -240,7 +240,7 @@ package body core is
|
|||||||
engine_active := true;
|
engine_active := true;
|
||||||
texture_array := new texture_data_array (0 .. 1600);
|
texture_array := new texture_data_array (0 .. 1600);
|
||||||
sound_array := new sound_data_array (0 .. 4);
|
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).");
|
echo (comment, "-- Setting trace log level to none (ignoring all default Raylib logs).");
|
||||||
ray.set_trace_log_level (ray.log_none);
|
ray.set_trace_log_level (ray.log_none);
|
||||||
|
@ -76,8 +76,7 @@ procedure main is
|
|||||||
procedure show_unit_menu is begin menu_insert (menu_unit); end show_unit_menu;
|
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_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 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_main_style is begin ui.active := ui.style'val ((ui.style'pos (ui.active) + 1) mod 7); end ui_main_style;
|
||||||
procedure ui_steam_style is begin ui.active := ui.steam; end ui_steam_style;
|
|
||||||
procedure hide_top_menu is begin menu_remove; end hide_top_menu;
|
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_in is begin core.zoom := 2; end zoom_in;
|
||||||
procedure zoom_out is begin core.zoom := 1; end zoom_out;
|
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_u => show_unit_menu'access,
|
||||||
core.signal_m => show_might_menu'access,
|
core.signal_m => show_might_menu'access,
|
||||||
core.signal_n => show_magic_menu'access,
|
core.signal_n => show_magic_menu'access,
|
||||||
core.signal_d => ui_main_style'access,
|
core.signal_v => ui_main_style'access,
|
||||||
core.signal_f => ui_steam_style'access,
|
|
||||||
core.signal_grave => hide_top_menu'access,
|
core.signal_grave => hide_top_menu'access,
|
||||||
core.signal_kp_add => zoom_in'access,
|
core.signal_kp_add => zoom_in'access,
|
||||||
core.signal_kp_subtract => zoom_out'access,
|
core.signal_kp_subtract => zoom_out'access,
|
||||||
|
@ -135,14 +135,15 @@ package body ui is
|
|||||||
glyphs (index) := core.import_font ("./sprite/ui/" & folder_path & "/font.png", 24, 0);
|
glyphs (index) := core.import_font ("./sprite/ui/" & folder_path & "/font.png", 24, 0);
|
||||||
--
|
--
|
||||||
for this in element loop
|
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 loop;
|
||||||
end load_ui;
|
end load_ui;
|
||||||
begin
|
begin
|
||||||
core.echo (core.comment, "Configuring UI components...");
|
core.echo (core.comment, "Configuring UI components...");
|
||||||
--
|
--
|
||||||
load_ui (main, "main/");
|
for index in style loop
|
||||||
load_ui (steam, "steam/");
|
load_ui (index, core.lowercase (style'image (index)));
|
||||||
|
end loop;
|
||||||
end configure;
|
end configure;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
@ -9,7 +9,8 @@ package ui is
|
|||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type style is (
|
type style is (
|
||||||
main, steam
|
main,
|
||||||
|
fairy, dwarf, gnoll, kobold, goblin, imp
|
||||||
);
|
);
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 468 B After Width: | Height: | Size: 688 B |
Loading…
Reference in New Issue
Block a user