Added skill and resource point lists in...

This commit is contained in:
Ognjen Milan Robovic 2024-05-11 00:49:15 -04:00
parent bd9b3f0056
commit 572372a3bf
6 changed files with 56 additions and 2 deletions

View File

@ -53,7 +53,7 @@ package body attribute is
height => core.icon);
--
ui.write (text => data (index)'image,
x => x + offset.x * enumeration'pos (index) - 6 + offset.y,
x => x + offset.x * enumeration'pos (index) - 3 + offset.y,
y => y + offset.y * enumeration'pos (index) + 6 + offset.x,
size => 18);
end loop;

View File

@ -39,7 +39,9 @@ package body chad is
procedure draw_data (player : in data; x, y : in integer) is
begin
attribute.draw_points (player.attributes, x, y, true);
attribute.draw_points (player.attributes, x, y, true);
skill.draw_points (player.skills, x + core.icon * 3, y, true);
resource.draw_points (player.resources, x + core.icon * 6, y, false);
end draw_data;
------------------------------------------------------------------------------------------

View File

@ -35,6 +35,30 @@ package body resource is
end loop;
end configure;
------------------------------------------------------------------------------------------
procedure draw_points (data : in points; x, y : in integer; list : in boolean) is
offset : constant core.vector := ((if list then 0 else core.icon),
(if list then core.icon else 0));
begin
for index in enumeration loop
ui.draw_icon (data => sprite (index),
text => trait (index).text,
x => x + offset.x * enumeration'pos (index),
y => y + offset.y * enumeration'pos (index));
--
ui.draw_icon_menu (x => x + offset.x * enumeration'pos (index) + offset.y,
y => y + offset.y * enumeration'pos (index) + offset.x,
width => core.icon,
height => core.icon);
--
ui.write (text => data (index)'image,
x => x + offset.x * enumeration'pos (index) - 3 + offset.y,
y => y + offset.y * enumeration'pos (index) + 6 + offset.x,
size => 18);
end loop;
end draw_points;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end resource;

View File

@ -39,6 +39,8 @@ package resource is
procedure configure;
procedure draw_points (data : in points; x, y : in integer; list : in boolean);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end resource;

View File

@ -39,6 +39,30 @@ package body skill is
end loop;
end configure;
------------------------------------------------------------------------------------------
procedure draw_points (data : in points; x, y : in integer; list : in boolean) is
offset : constant core.vector := ((if list then 0 else core.icon),
(if list then core.icon else 0));
begin
for index in enumeration loop
ui.draw_icon (data => sprite (index),
text => trait (index).text,
x => x + offset.x * enumeration'pos (index),
y => y + offset.y * enumeration'pos (index));
--
ui.draw_icon_menu (x => x + offset.x * enumeration'pos (index) + offset.y,
y => y + offset.y * enumeration'pos (index) + offset.x,
width => core.icon,
height => core.icon);
--
ui.write (text => data (index)'image,
x => x + offset.x * enumeration'pos (index) - 3 + offset.y,
y => y + offset.y * enumeration'pos (index) + 6 + offset.x,
size => 18);
end loop;
end draw_points;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end skill;

View File

@ -53,6 +53,8 @@ package skill is
procedure configure;
procedure draw_points (data : in points; x, y : in integer; list : in boolean);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end skill;