|
|
@@ -89,9 +89,9 @@ package body ui is |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
procedure draw_horizontally (index : in element; x, y, width : in integer; action : core.pointer := core.idle_skip'access) is |
|
|
|
procedure draw_horizontally (index : in element; x, y, width : in integer; action : core.pointer := core.idle_skip'access; tint : in core.colour := (others => 255)) is |
|
|
|
begin |
|
|
|
core.draw_horizontally (sprite (active, index), x, y, width, factor => 1); |
|
|
|
core.draw_horizontally (sprite (active, index), x, y, width, 1, tint); |
|
|
|
-- |
|
|
|
--~if core.cursor_mode = 1 and cursor_inside (x, y, width / core.zoom, sprite (active, index).height / core.zoom) then |
|
|
|
--~action.all; |
|
|
@@ -101,9 +101,9 @@ package body ui is |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
procedure draw_vertically (index : in element; x, y, height : in integer; action : core.pointer := core.idle_skip'access) is |
|
|
|
procedure draw_vertically (index : in element; x, y, height : in integer; action : core.pointer := core.idle_skip'access; tint : in core.colour := (others => 255)) is |
|
|
|
begin |
|
|
|
core.draw_vertically (sprite (active, index), x, y, height, factor => 1); |
|
|
|
core.draw_vertically (sprite (active, index), x, y, height, 1, tint); |
|
|
|
-- |
|
|
|
--~if core.cursor_mode = 1 and cursor_inside (x, y, sprite (active, index).width / core.zoom, height / core.zoom) then |
|
|
|
--~action.all; |
|
|
@@ -470,31 +470,17 @@ package body ui is |
|
|
|
procedure draw_tiny_fill_bar (x, y, width : in integer; fill : in float; tint : in core.colour) is |
|
|
|
middle_width : constant integer := width - sprite (active, tiny_fill_bar_left).width - sprite (active, tiny_fill_bar_right).width; |
|
|
|
fill_width : constant integer := integer (float (middle_width) * fill); |
|
|
|
crop_width : constant integer := sprite (active, tiny_fill_horizontal).width; |
|
|
|
crop_height : constant integer := sprite (active, tiny_fill_horizontal).height; |
|
|
|
begin |
|
|
|
draw (tiny_fill_bar_left, x, y - crop_height); |
|
|
|
draw (tiny_fill_bar_right, x + middle_width + crop_width, y - crop_height); |
|
|
|
draw (tiny_fill_bar_left, x, y - sprite (active, tiny_fill_bar_left).height); |
|
|
|
draw (tiny_fill_bar_right, x + middle_width + sprite (active, tiny_fill_bar_left).width, y - sprite (active, tiny_fill_bar_left).height); |
|
|
|
-- |
|
|
|
draw_horizontally (tiny_fill_bar_horizontal, x + sprite (active, tiny_fill_bar_left).width, y - crop_height, middle_width); |
|
|
|
draw_horizontally (tiny_fill_bar_horizontal, x + sprite (active, tiny_fill_bar_left).width, y - sprite (active, tiny_fill_bar_horizontal).height, middle_width); |
|
|
|
-- |
|
|
|
for move in 0 .. fill_width / crop_width - 1 loop |
|
|
|
core.draw (data => sprite (active, tiny_fill_horizontal), |
|
|
|
x => x + crop_width + move * crop_width, |
|
|
|
y => y - crop_height, |
|
|
|
tint => tint, |
|
|
|
factor => 1); |
|
|
|
end loop; |
|
|
|
-- |
|
|
|
if width mod crop_width > 0 then |
|
|
|
core.draw (data => sprite (active, tiny_fill_horizontal), |
|
|
|
x => x + crop_width + (fill_width / crop_width) * crop_width, |
|
|
|
y => y - crop_height, |
|
|
|
width => fill_width mod crop_width, |
|
|
|
height => crop_height, |
|
|
|
tint => tint, |
|
|
|
factor => 1); |
|
|
|
end if; |
|
|
|
draw_horizontally (index => tiny_fill_horizontal, |
|
|
|
x => x + sprite (active, tiny_fill_bar_left).width, |
|
|
|
y => y - sprite (active, tiny_fill_bar_horizontal).height, |
|
|
|
width => fill_width, |
|
|
|
tint => tint); |
|
|
|
end draw_tiny_fill_bar; |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------ |
|
|
|