|
|
@@ -26,9 +26,10 @@ package body skill is |
|
|
|
------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
procedure menu (x, y : in integer; center : in boolean) is |
|
|
|
column : constant integer := 4; |
|
|
|
offset : constant integer := 16; |
|
|
|
width : constant integer := 216 + 2 * offset; |
|
|
|
height : constant integer := count * core.icon + 2 * offset; |
|
|
|
width : constant integer := 216 * column + 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_y : constant integer := (if center then (core.window_height - height) / 2 else y); |
|
|
|
begin |
|
|
@@ -37,9 +38,9 @@ package body skill is |
|
|
|
-- |
|
|
|
for index in codex |
|
|
|
loop |
|
|
|
ui.draw_icon (trait (index).text, move_x + offset, move_y + offset + codex'pos (index) * core.icon); |
|
|
|
draw (index, move_x + offset, move_y + offset + codex'pos (index) * core.icon); |
|
|
|
core.write (trait (index).name, move_x + offset + core.icon, move_y + offset + codex'pos (index) * core.icon, ui.font (ui.active)); |
|
|
|
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 + 216 * (codex'pos (index) mod 4) + offset, move_y + core.icon * (codex'pos (index) / 4) + offset); |
|
|
|
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 menu; |
|
|
|
|
|
|
|