diff --git a/source/attribute.adb b/source/attribute.adb index ed27a56..f4ae49a 100644 --- a/source/attribute.adb +++ b/source/attribute.adb @@ -42,9 +42,20 @@ package body attribute is (if list then core.icon else 0)); begin 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 draw_points; diff --git a/source/chad.adb b/source/chad.adb index 9a39a75..f23bdf5 100644 --- a/source/chad.adb +++ b/source/chad.adb @@ -39,7 +39,7 @@ package body chad is procedure draw_data (player : in data; x, y : in integer) is begin - attribute.draw_points (player.attributes, x, y, false); + attribute.draw_points (player.attributes, x, y, true); end draw_data; ------------------------------------------------------------------------------------------ diff --git a/source/ui.adb b/source/ui.adb index 8b6b5dd..5002fd3 100644 --- a/source/ui.adb +++ b/source/ui.adb @@ -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; begin draw (icon, x, y); @@ -256,7 +256,7 @@ package body ui is if core.cursor_inside (x, y, core.icon, core.icon) then draw (icon_selected, x, y); -- - core.write_text_box (description); + core.write_text_box (text); -- if core.cursor_mode = 1 then 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; begin core.zoom := 1; diff --git a/source/ui.ads b/source/ui.ads index 175263b..a08e19d 100644 --- a/source/ui.ads +++ b/source/ui.ads @@ -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 draw_icon (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; 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; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access); procedure draw_text_box (text : in string);