diff --git a/source/chad.adb b/source/chad.adb index 359d770..48221e9 100644 --- a/source/chad.adb +++ b/source/chad.adb @@ -50,9 +50,37 @@ package body chad is ------------------------------------------------------------------------------------------ procedure draw_data (player : in data; x, y : in integer) is + offset : constant integer := 8; begin - attribute.draw_points (player.attributes, x, y, true); - skill.draw_points (player.skills, x + core.icon * 3, y, true); + ui.draw_frame ("--", x, y, 360 + 2 * offset, 96 + 2 * offset); + -- + view (player.index, x + offset, y + offset); + -- + ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 1 * core.icon + offset, 4 * core.icon, float (player.health.value) / float (player.health.limit)); + ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 2 * core.icon + offset, 4 * core.icon, float (player.mana.value) / float (player.mana.limit)); + ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 3 * core.icon + offset, 4 * core.icon, float (player.stamina.value) / float (player.stamina.limit)); + -- + ui.write (text => "Health " & player.health.value'image & " /" & player.health.limit'image, + x => x + view_width + 4 * core.icon + 3 * offset, + y => y + 2 * offset, + tint => (255, 127, 127, 255), + size => 15, + code => true); + ui.write (text => "Mana " & player.mana.value'image & " /" & player.mana.limit'image, + x => x + view_width + 4 * core.icon + 3 * offset, + y => y + core.icon + 2 * offset, + tint => (127, 127, 255, 255), + size => 15, + code => true); + ui.write (text => "Stamina" & player.stamina.value'image & " /" & player.stamina.limit'image, + x => x + view_width + 4 * core.icon + 3 * offset, + y => y + 2 * core.icon + 2 * offset, + tint => (127, 255, 127, 255), + size => 15, + code => true); + -- + --~attribute.draw_points (player.attributes, x, y, true); + --~skill.draw_points (player.skills, x + core.icon * 3, y, true); end draw_data; ------------------------------------------------------------------------------------------ diff --git a/source/main.adb b/source/main.adb index a460ed3..0395427 100644 --- a/source/main.adb +++ b/source/main.adb @@ -287,30 +287,7 @@ begin -- if view_list (status_preview_panel) then ui.draw_tiny_menu (preview_width, 0, side_panel, preview_height); - chad.draw_data (player, preview_width + 32, 128); - chad.view (chad.ada, preview_width + 32, 32); - ui.draw_tiny_fill_bar (preview_width + 32 + 64, 32 + 32, 128, float (player.health.value) / float (player.health.limit)); - ui.draw_tiny_fill_bar (preview_width + 32 + 64, 32 + 64, 128, float (player.mana.value) / float (player.mana.limit)); - ui.draw_tiny_fill_bar (preview_width + 32 + 64, 32 + 96, 128, float (player.stamina.value) / float (player.stamina.limit)); - -- - ui.write (text => "Health " & player.health.value'image & " /" & player.health.limit'image, - x => preview_width + 32 + 64 + 128 + 2, - y => 32 + 8, - tint => (255, 0, 0, 255), - size => 15, - code => true); - ui.write (text => "Mana " & player.mana.value'image & " /" & player.mana.limit'image, - x => preview_width + 32 + 64 + 128 + 2, - y => 64 + 8, - tint => (0, 0, 255, 255), - size => 15, - code => true); - ui.write (text => "Stamina" & player.stamina.value'image & " /" & player.stamina.limit'image, - x => preview_width + 32 + 64 + 128 + 2, - y => 96 + 8, - tint => (0, 255, 0, 255), - size => 15, - code => true); + chad.draw_data (player, preview_width + 32, 32); --~ui.draw_state_box (preview_width + 32, 32); end if; --