New skill menu...
This commit is contained in:
parent
37f0cb4e17
commit
df21c0f24f
@ -95,9 +95,9 @@ begin
|
|||||||
--
|
--
|
||||||
ui.draw_state_box (preview_width + 32, 32);
|
ui.draw_state_box (preview_width + 32, 32);
|
||||||
--
|
--
|
||||||
attribute.menu (300, 200, false);
|
--~attribute.menu (300, 200, false);
|
||||||
skill.menu (600, 300, true);
|
skill.menu (600, 300, true);
|
||||||
resource.menu (300, 500, false);
|
--~resource.menu (300, 500, false);
|
||||||
--~unit.menu (300, 500, true);
|
--~unit.menu (300, 500, true);
|
||||||
--
|
--
|
||||||
--~unit.stat (unit.griffin, 0, 0, true);
|
--~unit.stat (unit.griffin, 0, 0, true);
|
||||||
|
@ -26,9 +26,10 @@ package body skill is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure menu (x, y : in integer; center : in boolean) is
|
procedure menu (x, y : in integer; center : in boolean) is
|
||||||
|
column : constant integer := 4;
|
||||||
offset : constant integer := 16;
|
offset : constant integer := 16;
|
||||||
width : constant integer := 216 + 2 * offset;
|
width : constant integer := 216 * column + 2 * offset;
|
||||||
height : constant integer := count * core.icon + 2 * offset;
|
height : constant integer := (count / column) * core.icon + 2 * offset;
|
||||||
move_x : constant integer := (if center then (core.window_width - width) / 2 else x);
|
move_x : constant integer := (if center then (core.window_width - width) / 2 else x);
|
||||||
move_y : constant integer := (if center then (core.window_height - height) / 2 else y);
|
move_y : constant integer := (if center then (core.window_height - height) / 2 else y);
|
||||||
begin
|
begin
|
||||||
@ -37,9 +38,9 @@ package body skill is
|
|||||||
--
|
--
|
||||||
for index in codex
|
for index in codex
|
||||||
loop
|
loop
|
||||||
ui.draw_icon (trait (index).text, move_x + offset, move_y + offset + codex'pos (index) * core.icon);
|
ui.draw_icon (trait (index).text, move_x + 216 * (codex'pos (index) mod 4) + offset, move_y + core.icon * (codex'pos (index) / 4) + offset);
|
||||||
draw (index, move_x + offset, move_y + offset + codex'pos (index) * core.icon);
|
draw (index, move_x + 216 * (codex'pos (index) mod 4) + offset, move_y + core.icon * (codex'pos (index) / 4) + offset);
|
||||||
core.write (trait (index).name, move_x + offset + core.icon, move_y + offset + codex'pos (index) * core.icon, ui.font (ui.active));
|
core.write (trait (index).name, move_x + 216 * (codex'pos (index) mod 4) + offset + core.icon, move_y + core.icon * (codex'pos (index) / 4) + offset, ui.font (ui.active));
|
||||||
end loop;
|
end loop;
|
||||||
end menu;
|
end menu;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
with core, ui;
|
with core, ui;
|
||||||
|
|
||||||
use ui;
|
use ui;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user