xhads/source/ui.ads

81 lines
3.6 KiB
Ada

-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
--
-- GNU General Public Licence (version 3 or later)
with core;
use type core.cursor_code;
use type core.signal_code;
use type core.point;
use type core.unstring;
package ui is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type style is (
main,
fairy, dwarf, gnoll, kobold, goblin, imp
);
------------------------------------------------------------------------------------------
style_count : constant natural := style'pos (style'last) + 1;
monowidth : constant natural := 9;
monoheight : constant natural := 15;
font : array (style) of core.font;
active : style := main;
prioritize : boolean := false;
------------------------------------------------------------------------------------------
procedure configure;
procedure synchronize;
procedure echo (message : in string);
procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := font (active).scale; code : in boolean := false);
procedure draw_separator (x, y, width : in integer);
procedure draw_icon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);
procedure draw_icon_and_text (data : in core.sprite; text : in string; x, y, width : 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_sprite (data : in core.sprite; text : in string; x, y, offset : in integer; action : core.pointer := core.idle_skip'access);
procedure draw_text_box (x, y, width, height : in integer);
procedure draw_help_box (x, y, width, height : in integer; action : core.pointer := core.idle_skip'access);
procedure draw_frame (x, y, width, height : in integer);
procedure draw_button (text, description : in string; icon : in core.sprite; x, y, width, height : in integer; action : core.pointer := core.idle_skip'access);
procedure draw_text (text : in string; x, y, width, height : in integer := 0; offset, border : in natural := 0; tint : in core.colour := (others => 255));
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_tiny_fill_bar (x, y, width : in integer; fill : in float; tint : in core.colour);
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);
procedure draw_icon_menu (x, y, width, height : in integer; text : in string := "--"; action : in core.pointer := core.idle_skip'access);
procedure draw_end_turn_button (x, y : in integer);
procedure draw_console_box (x, y, width, height : in integer);
procedure iterate_style;
--~procedure write_ada_code (text : in core.string_box_data; x, y : in integer);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end ui;