xhads/source/menu.ads

61 lines
1.7 KiB
Ada

with core;
package menu is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type format is (
separator, button, text_box, data_box, check_box, title_bar, scroll_bar, fill_bar
);
type codex is (
attribute_information, skill_information, resource_information, none
);
------------------------------------------------------------------------------------------
type element is
record
kind : format;
data : integer;
text : core.short_string;
icon : core.sprite;
x : integer;
y : integer;
width : integer;
height : integer;
end record;
type element_array is array (natural range <>) of element;
type information is
record
title : core.short_string;
hide : boolean;
length : integer;
height : integer;
x : integer;
y : integer;
elements : access element_array;
end record;
type trait_array is array (codex) of information;
------------------------------------------------------------------------------------------
mouse_over_menu : codex;
mouse_over_menu_element : integer;
trait : trait_array;
------------------------------------------------------------------------------------------
procedure configure;
procedure synchronize;
procedure draw (index : in codex; x, y : in integer; center : in boolean);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end menu;