From c67091299f4007cad97db4a801491c16b4627f12 Mon Sep 17 00:00:00 2001 From: xolatile Date: Mon, 19 Feb 2024 16:33:45 -0500 Subject: [PATCH] Refactored menu creation... --- source/menu.adb | 14 +++----------- source/menu.ads | 1 + 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/source/menu.adb b/source/menu.adb index ee07ba1..8b97848 100644 --- a/source/menu.adb +++ b/source/menu.adb @@ -8,17 +8,9 @@ package body menu is procedure configure is begin - trait (attribute_information).title := "Attribute Information "; - trait (skill_information).title := "Skill Information "; - trait (resource_information).title := "Resource Information "; - -- - trait (attribute_information).elements := new element_array (0 .. attribute.count - 1); - trait (skill_information).elements := new element_array (0 .. skill.count - 1); - trait (resource_information).elements := new element_array (0 .. resource.count - 1); - -- - trait (attribute_information).length := attribute.count; - trait (skill_information).length := skill.count; - trait (resource_information).length := resource.count; + trait (attribute_information) := ("Attribute Information ", attribute.count, 10, new element_array (0 .. attribute.count - 1)); + trait (skill_information) := ("Skill Information ", skill.count, 10, new element_array (0 .. skill.count - 1)); + trait (resource_information) := ("Resource Information ", resource.count, 10, new element_array (0 .. resource.count - 1)); -- for index in attribute.codex loop diff --git a/source/menu.ads b/source/menu.ads index a400c84..cd51a7d 100644 --- a/source/menu.ads +++ b/source/menu.ads @@ -28,6 +28,7 @@ package menu is record title : core.short_string; length : integer; + height : integer; elements : access element_array; end record;