Forgot what I changed again...

This commit is contained in:
Ognjen Milan Robovic 2024-05-04 09:17:56 -04:00
parent b016ea93e7
commit 857e50e96d

View File

@ -67,15 +67,6 @@ package body ui is
------------------------------------------------------------------------------------------
procedure select_text_box (text : in string; x, y, width, height : in integer) is
begin
if cursor_inside (x, y, width, height) then
core.write_text_box (text);
end if;
end select_text_box;
------------------------------------------------------------------------------------------
procedure draw (index : in element := none;
x : in integer := 0;
y : in integer := 0;
@ -232,8 +223,6 @@ package body ui is
procedure draw_icon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle'access) is
save_zoom : natural := core.zoom;
begin
select_text_box (description, x, y, core.icon, core.icon);
--
draw (icon, x, y);
--
core.zoom := 1;
@ -242,6 +231,9 @@ package body ui is
--
if cursor_inside (x, y, core.icon, core.icon) then
draw (icon_selected, x, y);
--
core.write_text_box (description);
--
if core.cursor_mode = 1 then
action.all;
core.cursor_mode := 0;
@ -254,8 +246,6 @@ package body ui is
procedure draw_overicon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle'access) is
save_zoom : natural := core.zoom;
begin
select_text_box (description, x, y, core.icon, core.icon);
--
core.zoom := 1;
core.draw (data, x, y);
core.zoom := save_zoom;
@ -289,7 +279,7 @@ package body ui is
------------------------------------------------------------------------------------------
procedure a is begin core.echo (core.warning, "Heyo world!"); end a;
--~procedure a is begin core.echo (core.warning, "Heyo world!"); end a;
procedure draw_help_box (x, y, width, height : in integer; action : core.pointer := core.idle'access) is
offset : constant integer := sprite (active, text_middle).width;
begin
@ -307,9 +297,7 @@ package body ui is
--
core.write (core.read_text_box, x, y, font (active));
--
core.block_queue ((x, y, width, height, 2, a'access));
--
select_text_box ("", x, y, width, height);
--~core.block_queue ((x, y, width, height, 2, a'access));
end draw_help_box;
------------------------------------------------------------------------------------------
@ -333,8 +321,6 @@ package body ui is
draw (frame_upper_right, x + width - sprite (active, frame_upper_right).width, y);
draw (frame_lower_left, x, y + height - sprite (active, frame_lower_left).height);
draw (frame_lower_right, x + width - sprite (active, frame_lower_right).width, y + height - sprite (active, frame_lower_right).height);
--
select_text_box (description, x, y, width, height);
end draw_frame;
------------------------------------------------------------------------------------------
@ -348,8 +334,6 @@ 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 + 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;
------------------------------------------------------------------------------------------
@ -363,8 +347,6 @@ package body ui is
--
draw_horizontally (fill_bar_horizontal, x + sprite (active, fill_bar_left).width, y - sprite (active, fill_bar_horizontal).height, middle_width);
draw_horizontally (fill_horizontal, x + sprite (active, fill_bar_left).width, y - sprite (active, fill_bar_horizontal).height, fill_width);
--
select_text_box ("", x, y, width, sprite (active, fill_bar_horizontal).height);
end draw_fill_bar;
------------------------------------------------------------------------------------------
@ -398,8 +380,6 @@ package body ui is
draw (corner_upper_right, x + width - sprite (active, corner_upper_right).width, y);
draw (corner_lower_left, x, y + height - sprite (active, corner_lower_left).height);
draw (corner_lower_right, x + width - sprite (active, corner_lower_right).width, y + height - sprite (active, corner_lower_right).height);
--
select_text_box ("", x, y, width, height);
end draw_menu;
------------------------------------------------------------------------------------------
@ -424,8 +404,6 @@ package body ui is
draw (tiny_corner_upper_right, x + width - sprite (active, tiny_corner_upper_right).width, y);
draw (tiny_corner_lower_left, x, y + height - sprite (active, tiny_corner_lower_left).height);
draw (tiny_corner_lower_right, x + width - sprite (active, tiny_corner_lower_right).width, y + height - sprite (active, tiny_corner_lower_right).height);
--
select_text_box ("", x, y, width, height);
end draw_tiny_menu;
------------------------------------------------------------------------------------------
@ -448,8 +426,6 @@ package body ui is
draw (icon_upper_right, x + width - sprite (active, icon_upper_right).width, y);
draw (icon_lower_left, x, y + height - sprite (active, icon_lower_left).height);
draw (icon_lower_right, x + width - sprite (active, icon_lower_right).width, y + height - sprite (active, icon_lower_right).height);
--
select_text_box (description, x, y, width, height);
end draw_icon_menu;
------------------------------------------------------------------------------------------