Browse Source

Moved monospace font to UI...

master
parent
commit
be775dfd2e
3 changed files with 7 additions and 7 deletions
  1. +0
    -4
      source/main.adb
  2. +6
    -2
      source/ui.adb
  3. +1
    -1
      source/ui.ads

+ 0
- 4
source/main.adb View File

@@ -13,8 +13,6 @@ procedure main is

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

monospace : font;

side_panel : integer := 0;
preview_width : integer := 0;
preview_height : integer := 0;
@@ -142,8 +140,6 @@ begin

initialize;

monospace := import_font ("./sprite/ui/monospace.png", 11, 0);

ui.active := ui.main;

ui.configure;


+ 6
- 2
source/ui.adb View File

@@ -70,6 +70,8 @@ package body ui is

structure_count : natural := 0;

monospace : core.font;

------------------------------------------------------------------------------------------

procedure draw (index : in element := none;
@@ -229,6 +231,8 @@ package body ui is
end loop;
end load_ui;
begin
monospace := core.import_font ("./sprite/ui/monospace.png", 11, 0);
--
core.echo (core.comment, "Configuring UI components...");
--
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
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;

------------------------------------------------------------------------------------------


+ 1
- 1
source/ui.ads View File

@@ -57,7 +57,7 @@ package ui is
procedure configure;
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_overicon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);


Loading…
Cancel
Save