2024-04-25 00:27:13 -04:00
|
|
|
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
|
|
--
|
|
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
|
2024-02-15 21:03:09 -05:00
|
|
|
with core;
|
|
|
|
|
|
|
|
package ui is
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
type style is (
|
2024-04-30 19:58:38 -04:00
|
|
|
main,
|
|
|
|
fairy, dwarf, gnoll, kobold, goblin, imp
|
2024-02-15 21:03:09 -05:00
|
|
|
);
|
|
|
|
|
2024-05-03 07:55:17 -04:00
|
|
|
type enumeration is (
|
2024-05-19 15:06:20 -04:00
|
|
|
gui_none, gui_button, gui_line, gui_text, gui_icon, gui_sprite,
|
|
|
|
gui_orient
|
2024-05-03 07:55:17 -04:00
|
|
|
);
|
2024-05-01 09:15:38 -04:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-05-10 22:09:30 -04:00
|
|
|
style_count : constant natural := style'pos (style'last) + 1;
|
|
|
|
|
2024-06-05 01:24:45 -04:00
|
|
|
font : array (style) of core.font;
|
|
|
|
|
2024-05-09 03:53:38 -04:00
|
|
|
active : style := main;
|
|
|
|
prioritize : boolean := false;
|
2024-02-15 21:03:09 -05:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
procedure configure;
|
2024-05-01 09:15:38 -04:00
|
|
|
procedure synchronize;
|
|
|
|
|
2024-05-31 07:14:00 -04:00
|
|
|
procedure echo (message : in string);
|
|
|
|
|
2024-06-05 01:24:45 -04:00
|
|
|
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);
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-05-11 00:42:24 -04:00
|
|
|
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);
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-05-16 10:43:39 -04:00
|
|
|
procedure draw_sprite (data : in core.sprite; text : in string; x, y, offset : in integer; action : core.pointer := core.idle_skip'access);
|
|
|
|
|
2024-05-17 21:00:50 -04:00
|
|
|
procedure draw_text_box (x, y, width, height : in integer);
|
2024-05-09 05:07:20 -04:00
|
|
|
procedure draw_help_box (x, y, width, height : in integer; action : core.pointer := core.idle_skip'access);
|
2024-03-13 14:07:17 -04:00
|
|
|
|
2024-05-09 11:03:39 -04:00
|
|
|
procedure draw_frame (description : in string; x, y, width, height : in integer; action : core.pointer := core.idle_skip'access);
|
|
|
|
procedure draw_button (text, description : in string; icon : in core.sprite; x, y, width, height : in integer; action : core.pointer := core.idle_skip'access);
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-05-09 11:28:40 -04:00
|
|
|
procedure draw_check_box (x, y : in integer; on : in out boolean; text : in string);
|
|
|
|
|
2024-05-16 10:13:08 -04:00
|
|
|
procedure draw_title_bar (x, y, width : in integer; title : in string);
|
|
|
|
procedure draw_fill_bar (x, y, width : in integer; fill : in float);
|
2024-05-19 05:18:19 -04:00
|
|
|
procedure draw_tiny_fill_bar (x, y, width : in integer; fill : in float; tint : in core.colour);
|
2024-05-16 10:13:08 -04:00
|
|
|
procedure draw_scroll_bar (x, y, height : in integer; offset : in integer);
|
2024-02-16 14:58:54 -05:00
|
|
|
|
2024-04-27 12:34:16 -04:00
|
|
|
procedure draw_menu (x, y, width, height : in integer);
|
|
|
|
procedure draw_tiny_menu (x, y, width, height : in integer);
|
2024-05-09 04:07:25 -04:00
|
|
|
procedure draw_icon_menu (x, y, width, height : in integer);
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-06-01 14:09:35 -04:00
|
|
|
procedure draw_end_turn_button (x, y : in integer);
|
|
|
|
|
2024-05-31 07:14:00 -04:00
|
|
|
procedure draw_state_box (x, y : in integer);
|
|
|
|
procedure draw_console_box (x, y, width, height : in integer);
|
2024-03-14 14:40:05 -04:00
|
|
|
|
2024-06-04 08:21:24 -04:00
|
|
|
--~procedure write_ada_code (text : in core.string_box_data; x, y : in integer);
|
2024-05-13 04:03:27 -04:00
|
|
|
|
2024-02-15 21:03:09 -05:00
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end ui;
|