From 8beb8bdedaedd732f0e98613c5bdadfa60fe0e3c Mon Sep 17 00:00:00 2001 From: xolatile Date: Sat, 16 Mar 2024 08:14:22 -0400 Subject: [PATCH] Added unit, might and magic menus too... --- source/main.adb | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/source/main.adb b/source/main.adb index 52bef22..a6cefc4 100644 --- a/source/main.adb +++ b/source/main.adb @@ -18,7 +18,7 @@ procedure main 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; @@ -50,6 +50,9 @@ procedure main is when menu_attribute => attribute.menu (100, 100, false); when menu_skill => skill.menu (200, 200, 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 loop; 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_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_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; 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_s => show_skill_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, others => idle'access ); @@ -137,25 +146,10 @@ begin -- 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; -- 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); end loop gameplay;