2024-02-16 06:24:49 -05:00
|
|
|
with core, ui, attribute;
|
2024-02-15 21:03:09 -05:00
|
|
|
|
|
|
|
use attribute;
|
|
|
|
|
|
|
|
package body attribute is
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
2024-02-16 06:24:49 -05:00
|
|
|
type sprite_array is array (codex) of core.sprite;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
icon : sprite_array;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
procedure configure is
|
|
|
|
begin
|
|
|
|
for index in codex
|
|
|
|
loop
|
|
|
|
declare
|
|
|
|
folder : constant string := core.lowercase (ui.style'image (ui.active));
|
|
|
|
file : constant string := core.lowercase (codex'image (index));
|
|
|
|
begin
|
|
|
|
icon (index) := core.load_sprite ("./sprite/menu/" & folder & "/attribute/" & file & ".png", 1, 1);
|
|
|
|
end;
|
|
|
|
end loop;
|
|
|
|
end configure;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
procedure draw (index : in codex; x, y : in integer) is
|
2024-02-15 21:03:09 -05:00
|
|
|
begin
|
2024-02-16 06:24:49 -05:00
|
|
|
core.draw (icon (index), x, y);
|
2024-02-15 21:03:09 -05:00
|
|
|
end draw;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end attribute;
|