Work in progress on menu alignment...

Этот коммит содержится в:
Ognjen Milan Robovic 2024-05-07 09:06:08 -04:00
родитель 90d7576ad1
Коммит 2308d088b9
3 изменённых файлов: 20 добавлений и 1 удалений

Просмотреть файл

@ -24,13 +24,17 @@ package body skill is
structure.resize := true;
structure.x := 80;
structure.y := (core.window_height - 320) / 2;
structure.gui_n := count;
structure.gui_n := count + 1;
--
ui.add_structure (structure);
--
for index in enumeration loop
sprite (index) := core.import_sprite ("./sprite/skill/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
--
if enumeration'pos (index) = 9 then
ui.add_structure_orient;
end if;
--
ui.add_structure_button (sprite (index), trait (index).name, trait (index).text);
end loop;
end configure;

Просмотреть файл

@ -175,6 +175,9 @@ package body ui is
--~draw (cursor, at_x + new_width - 96, at_y);
--~end if;
at_y := at_y + core.icon + 2 * offset;
when gui_orient =>
at_x := at_x + new_width - 2 * core.icon + offset;
at_y := new_y + core.icon;
when others => null;
end case;
end loop;
@ -467,9 +470,20 @@ package body ui is
structure_array (structure_count - 1).gui_list (structure_array (structure_count - 1).gui_n).number := 0;
structure_array (structure_count - 1).gui_list (structure_array (structure_count - 1).gui_n).image := icon;
--
core.echo (core.import, "> button > " & text);
core.increment (structure_array (structure_count - 1).gui_n);
end add_structure_button;
------------------------------------------------------------------------------------------
procedure add_structure_orient is
begin
structure_array (structure_count - 1).gui_list (structure_array (structure_count - 1).gui_n).kind := gui_orient;
--
core.echo (core.import, "> orient");
core.increment (structure_array (structure_count - 1).gui_n);
end add_structure_orient;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end ui;

Просмотреть файл

@ -79,6 +79,7 @@ package ui is
procedure add_structure (data : in structure);
procedure add_structure_button (icon : in core.sprite; text : in core.short_string; description : in core.long_string := "");
procedure add_structure_orient;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------