Moved monospace font to UI...
This commit is contained in:
parent
2925dc0b95
commit
be775dfd2e
@ -13,8 +13,6 @@ procedure main is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
monospace : font;
|
|
||||||
|
|
||||||
side_panel : integer := 0;
|
side_panel : integer := 0;
|
||||||
preview_width : integer := 0;
|
preview_width : integer := 0;
|
||||||
preview_height : integer := 0;
|
preview_height : integer := 0;
|
||||||
@ -142,8 +140,6 @@ begin
|
|||||||
|
|
||||||
initialize;
|
initialize;
|
||||||
|
|
||||||
monospace := import_font ("./sprite/ui/monospace.png", 11, 0);
|
|
||||||
|
|
||||||
ui.active := ui.main;
|
ui.active := ui.main;
|
||||||
|
|
||||||
ui.configure;
|
ui.configure;
|
||||||
|
@ -70,6 +70,8 @@ package body ui is
|
|||||||
|
|
||||||
structure_count : natural := 0;
|
structure_count : natural := 0;
|
||||||
|
|
||||||
|
monospace : core.font;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure draw (index : in element := none;
|
procedure draw (index : in element := none;
|
||||||
@ -229,6 +231,8 @@ package body ui is
|
|||||||
end loop;
|
end loop;
|
||||||
end load_ui;
|
end load_ui;
|
||||||
begin
|
begin
|
||||||
|
monospace := core.import_font ("./sprite/ui/monospace.png", 11, 0);
|
||||||
|
--
|
||||||
core.echo (core.comment, "Configuring UI components...");
|
core.echo (core.comment, "Configuring UI components...");
|
||||||
--
|
--
|
||||||
for index in style loop
|
for index in style loop
|
||||||
@ -264,9 +268,9 @@ package body ui is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := 0) is
|
procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := 0; code : in boolean := false) is
|
||||||
begin
|
begin
|
||||||
core.write (text, x, y, tint, font (active).scale, font (active));
|
core.write (text, x, y, tint, font (active).scale, (if code then monospace else font (active)));
|
||||||
end write;
|
end write;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
@ -57,7 +57,7 @@ package ui is
|
|||||||
procedure configure;
|
procedure configure;
|
||||||
procedure synchronize;
|
procedure synchronize;
|
||||||
|
|
||||||
procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := 0);
|
procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := 0; code : in boolean := false);
|
||||||
|
|
||||||
procedure draw_icon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);
|
procedure draw_icon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);
|
||||||
procedure draw_overicon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);
|
procedure draw_overicon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);
|
||||||
|
Loading…
Reference in New Issue
Block a user