Implemented tiny fill bars for 7 UI themes...

This commit is contained in:
Ognjen Milan Robovic 2024-05-16 10:13:08 -04:00
parent a33b4e2453
commit 20e1c6a91c
37 changed files with 23 additions and 7 deletions

View File

@ -299,8 +299,9 @@ begin
view_show (index));
end loop;
--
resource.draw_points (player.resources, (preview_width - 4 * icon * resource.count) / 2, (if view_list (map_preview_panel) then icon else 0));
ui.draw_fill_bar ((preview_width - 320) / 2, 4 * (if view_list (map_preview_panel) then icon else 0), 320, 0.6);
resource.draw_points (player.resources, (preview_width - 4 * icon * resource.count) / 2, (if view_list (map_preview_panel) then icon else 0));
ui.draw_fill_bar ((preview_width - 320) / 2, 4 * (if view_list (map_preview_panel) then icon else 0), 320, 0.6);
ui.draw_tiny_fill_bar ((preview_width - 160) / 2, 5 * (if view_list (map_preview_panel) then icon else 0), 160, 0.8);
--
signal_list (signal_mode).all;
--
@ -308,8 +309,8 @@ begin
--~might.menu (0, 0, true);
--
chad.draw_alice;
deity.draw (deity.AEZORA, 300, 300);
deity.draw (deity.ULDRAE, 500, 300);
--~deity.draw (deity.AEZORA, 300, 300);
--~deity.draw (deity.ULDRAE, 500, 300);
--
ui.write (framerate'image, window_width - 5 * core.icon + 3, window_height - 27);
--

View File

@ -38,6 +38,7 @@ package body ui is
cursor, icon, overicon, icon_selected,
--
fill_bar_left, fill_bar_horizontal, fill_bar_right, fill_horizontal,
tiny_fill_bar_left, tiny_fill_bar_horizontal, tiny_fill_bar_right, tiny_fill_horizontal,
--
scroll_bar_lower, scroll_bar_middle, scroll_bar_upper,
--
@ -443,6 +444,19 @@ package body ui is
------------------------------------------------------------------------------------------
procedure draw_tiny_fill_bar (x, y, width : in integer; fill : in float) 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);
begin
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_right).height);
--
draw_horizontally (tiny_fill_bar_horizontal, x + sprite (active, tiny_fill_bar_left).width, y - sprite (active, tiny_fill_bar_horizontal).height, middle_width);
draw_horizontally (tiny_fill_horizontal, x + sprite (active, tiny_fill_bar_left).width, y - sprite (active, tiny_fill_bar_horizontal).height, fill_width);
end draw_tiny_fill_bar;
------------------------------------------------------------------------------------------
procedure draw_scroll_bar (x, y, height, offset : in integer) is
middle_height : constant integer := height - sprite (active, scroll_bar_upper).height - sprite (active, scroll_bar_lower).height;
begin

View File

@ -69,9 +69,10 @@ package ui is
procedure draw_check_box (x, y : in integer; on : in out boolean; text : in string);
procedure draw_title_bar (x, y, width : in integer; title : in string);
procedure draw_fill_bar (x, y, width : in integer; fill : in float);
procedure draw_scroll_bar (x, y, height : in integer; offset : in integer);
procedure draw_title_bar (x, y, width : in integer; title : in string);
procedure draw_fill_bar (x, y, width : in integer; fill : in float);
procedure draw_tiny_fill_bar (x, y, width : in integer; fill : in float);
procedure draw_scroll_bar (x, y, height : in integer; offset : in integer);
procedure draw_menu (x, y, width, height : in integer);
procedure draw_tiny_menu (x, y, width, height : in integer);

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B