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;
@ -324,22 +324,22 @@ package body ui is
procedure draw_state_box (x, y : in integer) is
begin
ui.write ("Cursor X :" & core.cursor.x'image, x, y + 0);
ui.write ("Cursor Y :" & core.cursor.y'image, x, y + 32);
ui.write ("Cursor Mode :" & core.cursor_mode'image, x, y + 64);
ui.write ("Camera X :" & core.camera.x'image, x, y + 96);
ui.write ("Camera Y :" & core.camera.y'image, x, y + 128);
ui.write ("Global Time :" & core.global_time'image, x, y + 160);
ui.write ("Gameplay Time :" & core.gameplay_time'image, x, y + 192);
ui.write ("Animation Time :" & core.animation_time'image, x, y + 224);
ui.write ("Framerate :" & core.framerate'image, x, y + 256);
ui.write ("Cursor X:" & core.cursor.x'image, x, y + 0);
ui.write ("Cursor Y:" & core.cursor.y'image, x, y + 32);
ui.write ("Cursor Mode:" & core.cursor_mode'image, x, y + 64);
ui.write ("Camera X:" & core.camera.x'image, x, y + 96);
ui.write ("Camera Y:" & core.camera.y'image, x, y + 128);
ui.write ("Global Time:" & core.global_time'image, x, y + 160);
ui.write ("Gameplay Time:" & core.gameplay_time'image, x, y + 192);
ui.write ("Animation Time:" & core.animation_time'image, x, y + 224);
ui.write ("Framerate:" & core.framerate'image, x, y + 256);
end draw_state_box;
------------------------------------------------------------------------------------------
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