UI refactoring works excellent, menu implementations later...

This commit is contained in:
Ognjen Milan Robovic 2024-05-01 09:26:06 -04:00
parent 6c225c9bbf
commit ab48e7100a
3 changed files with 7 additions and 7 deletions

View File

@ -140,7 +140,6 @@ begin
gameplay: loop
core.synchronize;
ui.synchronize;
--
exit when core.engine_active = false;
--
@ -164,6 +163,8 @@ begin
--
menu_render;
--
ui.synchronize;
--
ui.draw_help_box (0, core.window_height - text_box_height, core.window_width, text_box_height);
end loop gameplay;

View File

@ -10,7 +10,7 @@ package body skill is
sprite : array (enumeration) of core.sprite;
menu_data : ui.structure := ("Skill Menu ", core.signal_o, false, true, false, 0, 0, 320, 160);
menu_data : ui.structure := ("Skill Menu ", core.signal_o, true, true, false, 0, 0, 320, 160);
------------------------------------------------------------------------------------------

View File

@ -155,10 +155,6 @@ package body ui is
begin
draw_tiny_menu (new_x, new_y, new_width, new_height);
draw_title_bar (new_x, new_y, new_width, data.title);
--
if core.signal_mode = core.signal_code'pos (data.toggle) then
data.show := (if data.show then false else true);
end if;
end draw_structure;
------------------------------------------------------------------------------------------
@ -187,6 +183,10 @@ package body ui is
for index in 0 .. 12 loop
exit when index = structure_count;
--
if core.signal_mode = core.signal_code'pos (structure_array (index).toggle) then
structure_array (index).show := (if structure_array (index).show then false else true);
end if;
--
if structure_array (index).show then
draw_structure (structure_array (index));
end if;
@ -207,7 +207,6 @@ package body ui is
begin
select_text_box (description, x, y, core.icon, core.icon);
--
--~draw (icon, x, y);
draw (icon, x, y);
--
core.zoom := 1;