Finished core menu system probably...
This commit is contained in:
parent
4ed6af967d
commit
5d0a29f15a
@ -19,8 +19,10 @@ package body attribute is
|
||||
ui.add_structure ((title => "Attribute Menu ",
|
||||
toggle => core.signal_a,
|
||||
show => false,
|
||||
center => true,
|
||||
center => false,
|
||||
resize => true,
|
||||
x => 880,
|
||||
y => (core.window_height - 320) / 2,
|
||||
gui_n => 0,
|
||||
gui_list => (others => ui.empty),
|
||||
others => 0));
|
||||
|
@ -175,6 +175,8 @@ begin
|
||||
|
||||
ui.active := ui.imp;
|
||||
|
||||
core.camera := (50, 50);
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
gameplay: loop
|
||||
|
@ -19,8 +19,10 @@ package body resource is
|
||||
ui.add_structure ((title => "Resource Menu ",
|
||||
toggle => core.signal_r,
|
||||
show => false,
|
||||
center => true,
|
||||
center => false,
|
||||
resize => true,
|
||||
x => 480,
|
||||
y => (core.window_height - 320) / 2,
|
||||
gui_n => 0,
|
||||
gui_list => (others => ui.empty),
|
||||
others => 0));
|
||||
|
@ -23,8 +23,10 @@ package body skill is
|
||||
ui.add_structure ((title => "Skill Menu ",
|
||||
toggle => core.signal_s,
|
||||
show => false,
|
||||
center => true,
|
||||
center => false,
|
||||
resize => true,
|
||||
x => 80,
|
||||
y => (core.window_height - 320) / 2,
|
||||
gui_n => 0,
|
||||
gui_list => (others => ui.empty),
|
||||
others => 0));
|
||||
|
@ -151,7 +151,7 @@ package body ui is
|
||||
|
||||
procedure draw_structure (data : in structure) is
|
||||
offset : constant integer := core.icon;
|
||||
new_width : constant integer := (if data.resize then 300 else data.width);
|
||||
new_width : constant integer := (if data.resize then 320 else data.width);
|
||||
new_height : constant integer := (if data.resize then data.gui_n * core.icon + 2 * offset else data.height);
|
||||
new_x : constant integer := (if data.center then (core.window_width - new_width) / 2 else data.x);
|
||||
new_y : constant integer := (if data.center then (core.window_height - new_height) / 2 else data.y);
|
||||
@ -166,8 +166,8 @@ package body ui is
|
||||
case data.gui_list (x).kind is
|
||||
when gui_button =>
|
||||
draw_icon (data.gui_list (x).image, "", at_x, at_y);
|
||||
draw_frame ("", at_x + core.icon, at_y, new_width - 2 * offset - core.icon, core.icon);
|
||||
write (data.gui_list (x).text, at_x + core.icon, at_y);
|
||||
draw_frame ("", at_x + core.icon + 2, at_y, new_width - 2 * offset - core.icon - 2, core.icon);
|
||||
write (data.gui_list (x).text, at_x + core.icon + 6, at_y + 2);
|
||||
at_y := at_y + core.icon;
|
||||
when others => null;
|
||||
end case;
|
||||
@ -331,7 +331,7 @@ package body ui is
|
||||
--
|
||||
draw_horizontally (title_bar_middle, x + sprite (active, title_bar_left).width, y - sprite (active, title_bar_middle).height, middle_width);
|
||||
--
|
||||
core.write (title, x + sprite (active, title_bar_left).width / 2 + 16, y - sprite (active, title_bar_middle).height / 2 - 8, font (active));
|
||||
core.write (title, x + sprite (active, title_bar_left).width / 2 + 20, y - sprite (active, title_bar_middle).height / 2 - 6, font (active));
|
||||
--
|
||||
select_text_box (title, x, y - sprite (active, title_bar_middle).height, width, sprite (active, title_bar_middle).height);
|
||||
end draw_title_bar;
|
||||
|
Loading…
Reference in New Issue
Block a user