Prototyping out Chad state view panel...

This commit is contained in:
Ognjen Milan Robovic 2024-05-11 00:42:24 -04:00
parent 39335fe890
commit bd9b3f0056
4 changed files with 19 additions and 8 deletions

View File

@ -42,9 +42,20 @@ package body attribute is
(if list then core.icon else 0)); (if list then core.icon else 0));
begin begin
for index in enumeration loop for index in enumeration loop
ui.draw_icon (sprite (index), trait (index).text, x + offset.x * enumeration'pos (index), y + offset.y * enumeration'pos (index)); 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.write (data (index)'image, x + offset.x * enumeration'pos (index) + 3, y + offset.y * enumeration'pos (index) + core.icon + 3, size => 18); 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) - 6 + offset.y,
y => y + offset.y * enumeration'pos (index) + 6 + offset.x,
size => 18);
end loop; end loop;
end draw_points; end draw_points;

View File

@ -39,7 +39,7 @@ package body chad is
procedure draw_data (player : in data; x, y : in integer) is procedure draw_data (player : in data; x, y : in integer) is
begin begin
attribute.draw_points (player.attributes, x, y, false); attribute.draw_points (player.attributes, x, y, true);
end draw_data; end draw_data;
------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------

View File

@ -244,7 +244,7 @@ package body ui is
------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------
procedure draw_icon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle_skip'access) is procedure draw_icon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access) is
save_zoom : natural := core.zoom; save_zoom : natural := core.zoom;
begin begin
draw (icon, x, y); draw (icon, x, y);
@ -256,7 +256,7 @@ package body ui is
if core.cursor_inside (x, y, core.icon, core.icon) then if core.cursor_inside (x, y, core.icon, core.icon) then
draw (icon_selected, x, y); draw (icon_selected, x, y);
-- --
core.write_text_box (description); core.write_text_box (text);
-- --
if core.cursor_mode = 1 then if core.cursor_mode = 1 then
action.all; action.all;
@ -267,7 +267,7 @@ package body ui is
------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------
procedure draw_overicon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle_skip'access) is procedure draw_overicon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access) is
save_zoom : natural := core.zoom; save_zoom : natural := core.zoom;
begin begin
core.zoom := 1; core.zoom := 1;

View File

@ -59,8 +59,8 @@ package ui is
procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := 0); procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := 0);
procedure draw_icon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle_skip'access); procedure draw_icon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);
procedure draw_overicon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle_skip'access); procedure draw_overicon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);
procedure draw_text_box (text : in string); procedure draw_text_box (text : in string);