|
|
@@ -38,7 +38,9 @@ package body ui is |
|
|
|
-- |
|
|
|
scroll_bar_lower, scroll_bar_middle, scroll_bar_upper, |
|
|
|
-- |
|
|
|
title_bar_left, title_bar_middle, title_bar_right |
|
|
|
title_bar_left, title_bar_middle, title_bar_right, |
|
|
|
-- |
|
|
|
check_box_on, check_box_off |
|
|
|
); |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------ |
|
|
@@ -171,11 +173,6 @@ package body ui is |
|
|
|
for x in 0 .. data.gui_n - 1 loop |
|
|
|
case data.gui_list (x).kind is |
|
|
|
when gui_button => |
|
|
|
--~draw_frame (data.gui_list (x).info, button_data.x, button_data.y, button_data.width, button_data.height); |
|
|
|
--~draw_icon (data.gui_list (x).image, data.gui_list (x).info, button_data.x + offset, button_data.y + offset); |
|
|
|
--~write (data.gui_list (x).text, |
|
|
|
--~button_data.x + offset + core.icon + (core.icon - font (active).scale) / 2, |
|
|
|
--~button_data.y + offset + (core.icon - font (active).scale) / 2); |
|
|
|
draw_button (text => data.gui_list (x).text, |
|
|
|
description => data.gui_list (x).info, |
|
|
|
icon => data.gui_list (x).image, |
|
|
@@ -379,6 +376,20 @@ package body ui is |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
procedure draw_check_box (x, y : in integer; on : in out boolean; text : in string) is |
|
|
|
begin |
|
|
|
draw ((if on then check_box_on else check_box_off), x, y); |
|
|
|
-- |
|
|
|
write (text, x + sprite (active, check_box_on).width, y); |
|
|
|
-- |
|
|
|
if core.cursor_mode = 1 and core.cursor_inside (x, y, sprite (active, check_box_on).width, sprite (active, check_box_on).height) then |
|
|
|
on := not on; |
|
|
|
core.cursor_mode := 0; |
|
|
|
end if; |
|
|
|
end draw_check_box; |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
procedure draw_title_bar (x, y, width : in integer; title : in string) is |
|
|
|
middle_width : constant integer := width - sprite (active, title_bar_left).width - sprite (active, title_bar_right).width; |
|
|
|
offset : constant integer := (sprite (active, title_bar_middle).height - font (active).scale) / 2; |
|
|
|