Work in progress on menu alignment...
This commit is contained in:
parent
90d7576ad1
commit
2308d088b9
@ -24,13 +24,17 @@ package body skill is
|
|||||||
structure.resize := true;
|
structure.resize := true;
|
||||||
structure.x := 80;
|
structure.x := 80;
|
||||||
structure.y := (core.window_height - 320) / 2;
|
structure.y := (core.window_height - 320) / 2;
|
||||||
structure.gui_n := count;
|
structure.gui_n := count + 1;
|
||||||
--
|
--
|
||||||
ui.add_structure (structure);
|
ui.add_structure (structure);
|
||||||
--
|
--
|
||||||
for index in enumeration loop
|
for index in enumeration loop
|
||||||
sprite (index) := core.import_sprite ("./sprite/skill/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
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);
|
ui.add_structure_button (sprite (index), trait (index).name, trait (index).text);
|
||||||
end loop;
|
end loop;
|
||||||
end configure;
|
end configure;
|
||||||
|
@ -175,6 +175,9 @@ package body ui is
|
|||||||
--~draw (cursor, at_x + new_width - 96, at_y);
|
--~draw (cursor, at_x + new_width - 96, at_y);
|
||||||
--~end if;
|
--~end if;
|
||||||
at_y := at_y + core.icon + 2 * offset;
|
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;
|
when others => null;
|
||||||
end case;
|
end case;
|
||||||
end loop;
|
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).number := 0;
|
||||||
structure_array (structure_count - 1).gui_list (structure_array (structure_count - 1).gui_n).image := icon;
|
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);
|
core.increment (structure_array (structure_count - 1).gui_n);
|
||||||
end add_structure_button;
|
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;
|
end ui;
|
||||||
|
@ -79,6 +79,7 @@ package ui is
|
|||||||
procedure add_structure (data : in structure);
|
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_button (icon : in core.sprite; text : in core.short_string; description : in core.long_string := "");
|
||||||
|
procedure add_structure_orient;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user