Menu quick fix...
This commit is contained in:
parent
cda04b245a
commit
27aeb36d70
@ -51,7 +51,7 @@ package body menu is
|
|||||||
--
|
--
|
||||||
for element_index in 0 .. limitation - 1
|
for element_index in 0 .. limitation - 1
|
||||||
loop
|
loop
|
||||||
ui.draw_frame (offset_x + draw_offset, offset_y + draw_offset + element_index * offset, offset, offset);
|
ui.draw_frame (offset_x + draw_offset, offset_y + draw_offset + element_index * offset, width - 2 * draw_offset, offset);
|
||||||
--
|
--
|
||||||
core.draw (trait (index).elements (element_index).icon, offset_x + draw_offset + icon_offset, offset_y + draw_offset + icon_offset + element_index * offset);
|
core.draw (trait (index).elements (element_index).icon, offset_x + draw_offset + icon_offset, offset_y + draw_offset + icon_offset + element_index * offset);
|
||||||
core.write (trait (index).elements (element_index).text, offset_x + draw_offset + icon_offset + offset, offset_y + draw_offset + icon_offset + element_index * offset);
|
core.write (trait (index).elements (element_index).text, offset_x + draw_offset + icon_offset + offset, offset_y + draw_offset + icon_offset + element_index * offset);
|
||||||
|
@ -103,13 +103,33 @@ package body ui is
|
|||||||
offset_x : constant integer := sprite (active, frame_middle).width;
|
offset_x : constant integer := sprite (active, frame_middle).width;
|
||||||
offset_y : constant integer := sprite (active, frame_middle).height;
|
offset_y : constant integer := sprite (active, frame_middle).height;
|
||||||
begin
|
begin
|
||||||
if width < 2 * offset_x or height < 2 * offset_y then
|
if height < 2 * offset_y then
|
||||||
crop (frame_upper_left, x, y, 0, 0, width / 2, height / 2);
|
draw_horizontally (frame_upper, x + offset_x, y, width - 2 * offset_x);
|
||||||
crop (frame_upper_right, x + width / 2, y, offset_x - width / 2, 0, width / 2, height / 2);
|
draw_horizontally (frame_lower, x + offset_x, y + height - offset_y, width - 2 * offset_x);
|
||||||
crop (frame_lower_left, x, y + height / 2, 0, offset_y - height / 2, width / 2, height / 2);
|
--
|
||||||
crop (frame_lower_right, x + width / 2, y + height / 2, offset_x - width / 2, offset_y - height / 2, width / 2, height / 2);
|
crop (frame_upper_left, x, y, 0, 0, sprite (active, frame_upper_left).width, height / 2);
|
||||||
|
crop (frame_upper_right, x + width - offset_x, y, 0, 0, sprite (active, frame_upper_right).width, height / 2);
|
||||||
|
crop (frame_lower_left, x, y + height / 2, 0, offset_y - height / 2, sprite (active, frame_lower_left).width, height / 2);
|
||||||
|
crop (frame_lower_right, x + width - offset_x, y + height / 2, 0, offset_y - height / 2, sprite (active, frame_lower_right).width, height / 2);
|
||||||
return;
|
return;
|
||||||
end if;
|
end if;
|
||||||
|
--
|
||||||
|
--~if width < 2 * offset_x then
|
||||||
|
--~crop (frame_upper_left, x, y, 0, 0, width / 2, height / 2);
|
||||||
|
--~crop (frame_upper_right, x + width / 2, y, offset_x - width / 2, 0, width / 2, height / 2);
|
||||||
|
--~crop (frame_lower_left, x, y + height / 2, 0, offset_y - height / 2, width / 2, height / 2);
|
||||||
|
--~crop (frame_lower_right, x + width / 2, y + height / 2, offset_x - width / 2, offset_y - height / 2, width / 2, height / 2);
|
||||||
|
--~return;
|
||||||
|
--~end if;
|
||||||
|
--~--
|
||||||
|
--~if width < 2 * offset_x or height < 2 * offset_y then
|
||||||
|
--~crop (frame_upper_left, x, y, 0, 0, width / 2, height / 2);
|
||||||
|
--~crop (frame_upper_right, x + width / 2, y, offset_x - width / 2, 0, width / 2, height / 2);
|
||||||
|
--~crop (frame_lower_left, x, y + height / 2, 0, offset_y - height / 2, width / 2, height / 2);
|
||||||
|
--~crop (frame_lower_right, x + width / 2, y + height / 2, offset_x - width / 2, offset_y - height / 2, width / 2, height / 2);
|
||||||
|
--~return;
|
||||||
|
--~end if;
|
||||||
|
--
|
||||||
draw_background (frame_middle, x + offset_x, y + offset_y, width - 2 * offset_x, height - 2 * offset_y);
|
draw_background (frame_middle, x + offset_x, y + offset_y, width - 2 * offset_x, height - 2 * offset_y);
|
||||||
--
|
--
|
||||||
draw_horizontally (frame_upper, x + offset_x, y, width - 2 * offset_x);
|
draw_horizontally (frame_upper, x + offset_x, y, width - 2 * offset_x);
|
||||||
|
Loading…
Reference in New Issue
Block a user