Fixed font, dwarven title bar, etc.

This commit is contained in:
Ognjen Milan Robovic 2024-04-30 23:17:05 -04:00
parent 7048a13d74
commit 7fc9681914
5 changed files with 14 additions and 14 deletions

View File

@ -44,7 +44,7 @@ package body ui is
------------------------------------------------------------------------------------------
sprite : array (style, element) of core.sprite;
glyphs : array (style) of core.font;
font : array (style) of core.font;
------------------------------------------------------------------------------------------
@ -132,7 +132,7 @@ package body ui is
procedure configure is
procedure load_ui (index : in style; folder_path : in string) is
begin
glyphs (index) := core.import_font ("./sprite/ui/" & folder_path & "/font.png", 24, 0);
font (index) := core.import_font ("./sprite/ui/" & folder_path & "/font.png", 24, 0);
--
for this in element loop
sprite (index, this) := core.import_sprite ("./sprite/ui/" & folder_path & "/" & core.lowercase (element'image (this)) & ".png", 1, 1);
@ -191,7 +191,7 @@ package body ui is
draw (text_lower_left, x, y + height - offset);
draw (text_lower_right, x + width - offset, y + height - offset);
--
core.write (core.read_text_box, x, y, glyphs (active));
core.write (core.read_text_box, x, y, font (active));
--
select_text_box ("", x, y, width, height);
end draw_text_box;
@ -231,7 +231,7 @@ 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 + 16, y - sprite (active, title_bar_middle).height / 2 - 8, glyphs (active));
core.write (title, x + sprite (active, title_bar_left).width / 2 + 16, y - sprite (active, title_bar_middle).height / 2 - 8, 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;
@ -339,7 +339,7 @@ package body ui is
procedure write (text : in string; x, y : in integer) is
begin
core.write (text, x, y, glyphs (active));
core.write (text, x, y, font (active));
end write;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB