Working on Chad menus...
This commit is contained in:
parent
6e85588237
commit
5b0c6f2e0f
@ -50,9 +50,37 @@ 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
|
||||||
|
offset : constant integer := 8;
|
||||||
begin
|
begin
|
||||||
attribute.draw_points (player.attributes, x, y, true);
|
ui.draw_frame ("--", x, y, 360 + 2 * offset, 96 + 2 * offset);
|
||||||
skill.draw_points (player.skills, x + core.icon * 3, y, true);
|
--
|
||||||
|
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;
|
end draw_data;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
@ -287,30 +287,7 @@ begin
|
|||||||
--
|
--
|
||||||
if view_list (status_preview_panel) then
|
if view_list (status_preview_panel) then
|
||||||
ui.draw_tiny_menu (preview_width, 0, side_panel, preview_height);
|
ui.draw_tiny_menu (preview_width, 0, side_panel, preview_height);
|
||||||
chad.draw_data (player, preview_width + 32, 128);
|
chad.draw_data (player, preview_width + 32, 32);
|
||||||
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);
|
|
||||||
--~ui.draw_state_box (preview_width + 32, 32);
|
--~ui.draw_state_box (preview_width + 32, 32);
|
||||||
end if;
|
end if;
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user