Added unit, might and magic menus too...

This commit is contained in:
Ognjen Milan Robovic 2024-03-16 08:14:22 -04:00
parent b33bbf962c
commit 8beb8bdeda

View File

@ -18,7 +18,7 @@ procedure main is
------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------
type menu_index is ( type menu_index is (
menu_none, menu_attribute, menu_skill, menu_resource--, menu_unit, menu_might, menu_magic menu_none, menu_attribute, menu_skill, menu_resource, menu_unit, menu_might, menu_magic
); );
menu_limit : constant integer := 3; menu_limit : constant integer := 3;
@ -50,6 +50,9 @@ procedure main is
when menu_attribute => attribute.menu (100, 100, false); when menu_attribute => attribute.menu (100, 100, false);
when menu_skill => skill.menu (200, 200, false); when menu_skill => skill.menu (200, 200, false);
when menu_resource => resource.menu (300, 300, false); when menu_resource => resource.menu (300, 300, false);
when menu_unit => unit.menu (0, 0, true);
when menu_might => might.menu (0, 0, true);
when menu_magic => magic.menu (0, 0, true);
end case; end case;
end loop; end loop;
end menu_render; end menu_render;
@ -64,6 +67,9 @@ procedure main is
procedure show_attribute_menu is begin menu_insert (menu_attribute); end show_attribute_menu; procedure show_attribute_menu is begin menu_insert (menu_attribute); end show_attribute_menu;
procedure show_skill_menu is begin menu_insert (menu_skill); end show_skill_menu; procedure show_skill_menu is begin menu_insert (menu_skill); end show_skill_menu;
procedure show_resource_menu is begin menu_insert (menu_resource); end show_resource_menu; procedure show_resource_menu is begin menu_insert (menu_resource); end show_resource_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_magic_menu is begin menu_insert (menu_magic); end show_magic_menu;
procedure hide_top_menu is begin menu_remove; end hide_top_menu; procedure hide_top_menu is begin menu_remove; end hide_top_menu;
signal_list : constant array (core.signal_code) of access procedure := ( signal_list : constant array (core.signal_code) of access procedure := (
@ -74,6 +80,9 @@ procedure main is
core.signal_a => show_attribute_menu'access, core.signal_a => show_attribute_menu'access,
core.signal_s => show_skill_menu'access, core.signal_s => show_skill_menu'access,
core.signal_r => show_resource_menu'access, core.signal_r => show_resource_menu'access,
core.signal_u => show_unit_menu'access,
core.signal_m => show_might_menu'access,
core.signal_n => show_magic_menu'access,
core.signal_grave => hide_top_menu'access, core.signal_grave => hide_top_menu'access,
others => idle'access others => idle'access
); );
@ -137,25 +146,10 @@ begin
-- --
ui.draw_state_box (preview_width + 32, 32); ui.draw_state_box (preview_width + 32, 32);
-- --
--~attribute.menu (100, 100, false);
--~skill.menu (600, 200, false);
--~resource.menu (100, 400, false);
--~unit.menu (0, 0, true);
--
--~unit.stat (unit.griffin, 0, 0, true);
--~unit.stat (unit.halberdier, 0, 0, true);
--~unit.stat (unit.spirit, 0, 0, true);
--~unit.stat (unit.power_lich, 600, 300, false);
--
--~magic.menu (0, 0, true);
--~might.menu (0, 0, true);
--
signal_list (core.signal_code'val (core.signal_mode)).all; signal_list (core.signal_code'val (core.signal_mode)).all;
-- --
menu_render; menu_render;
-- --
core.write (integer'image (menu_count), 0, 0, ui.font (ui.active), 16#FF0000#);
--
ui.draw_text_box (0, core.window_height - 32, core.window_width, 32); ui.draw_text_box (0, core.window_height - 32, core.window_width, 32);
end loop gameplay; end loop gameplay;