Work in progress UI changes...
This commit is contained in:
parent
4f46b202df
commit
a3b1bbbc82
@ -41,7 +41,6 @@ package body chad is
|
||||
begin
|
||||
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;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
@ -24,7 +24,7 @@ procedure main is
|
||||
index => chad.ognjen,
|
||||
attributes => (1, 2, 3, 4, 5, 6),
|
||||
skills => (1, 2, 3, 4, 5, 6, 7, 8, 9, others => 0),
|
||||
resources => (1, 2, 3, 4, 5, 6)
|
||||
resources => (101, 103, 107, 109, 113, 127)
|
||||
);
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
@ -128,53 +128,6 @@ procedure main is
|
||||
ui.draw_check_box (0, 96, view_list (text_box_panel), "text_box_panel");
|
||||
end main_menu;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure gameplay is
|
||||
begin
|
||||
if not view_list (status_preview_panel) then
|
||||
side_panel := 0;
|
||||
else
|
||||
side_panel := window_width / 4;
|
||||
end if;
|
||||
--
|
||||
preview_width := window_width - side_panel;
|
||||
preview_height := window_height - text_box_height;
|
||||
text_box_height := 32;
|
||||
--
|
||||
world.draw;
|
||||
--
|
||||
if view_list (map_preview_panel) then
|
||||
ui.draw_menu (0, 0, preview_width, preview_height);
|
||||
end if;
|
||||
--
|
||||
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, 32);
|
||||
--~ui.draw_state_box (preview_width + 32, 32);
|
||||
end if;
|
||||
--
|
||||
if view_list (text_box_panel) then
|
||||
ui.draw_help_box (0, window_height - text_box_height, window_width - icon * (view'pos (view'last) + 1), text_box_height);
|
||||
end if;
|
||||
--
|
||||
for index in view loop
|
||||
ui.draw_icon (view_icon (index), view_text (index),
|
||||
window_width - icon * (view'pos (view'last) + 1) + icon * view'pos (index),
|
||||
window_height - text_box_height,
|
||||
view_show (index));
|
||||
end loop;
|
||||
--
|
||||
signal_list (signal_mode).all;
|
||||
--
|
||||
--~magic.menu (0, 0, true);
|
||||
--~might.menu (0, 0, true);
|
||||
--
|
||||
chad.draw_alice;
|
||||
--
|
||||
ui.synchronize;
|
||||
end gameplay;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
begin
|
||||
@ -259,7 +212,49 @@ begin
|
||||
--
|
||||
exit when engine_active = false;
|
||||
--
|
||||
gameplay;
|
||||
if not view_list (status_preview_panel) then
|
||||
side_panel := 0;
|
||||
else
|
||||
side_panel := window_width / 4;
|
||||
end if;
|
||||
--
|
||||
preview_width := window_width - side_panel;
|
||||
preview_height := window_height - text_box_height;
|
||||
text_box_height := 32;
|
||||
--
|
||||
world.draw;
|
||||
--
|
||||
if view_list (map_preview_panel) then
|
||||
ui.draw_menu (0, 0, preview_width, preview_height);
|
||||
end if;
|
||||
--
|
||||
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, 32);
|
||||
--~ui.draw_state_box (preview_width + 32, 32);
|
||||
end if;
|
||||
--
|
||||
if view_list (text_box_panel) then
|
||||
ui.draw_help_box (0, window_height - text_box_height, window_width - icon * (view'pos (view'last) + 1), text_box_height);
|
||||
end if;
|
||||
--
|
||||
for index in view loop
|
||||
ui.draw_icon (view_icon (index), view_text (index),
|
||||
window_width - icon * (view'pos (view'last) + 1) + icon * view'pos (index),
|
||||
window_height - text_box_height,
|
||||
view_show (index));
|
||||
end loop;
|
||||
--
|
||||
resource.draw_points (player.resources, (preview_width - 4 * icon * resource.count) / 2, icon);
|
||||
--
|
||||
signal_list (signal_mode).all;
|
||||
--
|
||||
--~magic.menu (0, 0, true);
|
||||
--~might.menu (0, 0, true);
|
||||
--
|
||||
chad.draw_alice;
|
||||
--
|
||||
ui.synchronize;
|
||||
end loop gameplay_loop;
|
||||
|
||||
--~world.mapshot ("./test.png");
|
||||
|
@ -37,25 +37,12 @@ package body resource is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
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));
|
||||
procedure draw_points (data : in points; x, y : in integer) is
|
||||
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);
|
||||
ui.draw_icon (sprite (index), trait (index).text, x + 4 * core.icon * enumeration'pos (index), y);
|
||||
ui.draw_frame (trait (index).text, x + 4 * core.icon * enumeration'pos (index) + core.icon, y, 3 * core.icon, core.icon);
|
||||
ui.write (data (index)'image, x + 4 * core.icon * enumeration'pos (index) + core.icon - 3, y + 6, size => 18);
|
||||
end loop;
|
||||
end draw_points;
|
||||
|
||||
|
@ -39,7 +39,7 @@ package resource is
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw_points (data : in points; x, y : in integer; list : in boolean);
|
||||
procedure draw_points (data : in points; x, y : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -58,7 +58,7 @@ package body unit is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_full (index : in natural; x, y : in integer) is
|
||||
limit : constant value_count := value_count (index);
|
||||
limit : constant value_limit := value_limit (index);
|
||||
begin
|
||||
draw (values (limit).kind, values (limit).state, x, y);
|
||||
--
|
||||
|
@ -30,8 +30,8 @@ package unit is
|
||||
items : item.equip_array := (others => item.empty);
|
||||
end record;
|
||||
|
||||
type value_count is range 0 .. 100;
|
||||
type value_array is array (value_count) of value;
|
||||
type value_limit is range 0 .. 100;
|
||||
type value_array is array (value_limit) of value;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user