-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic -- -- GNU General Public Licence (version 3 or later) with core; package ui is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ type style is ( main, fairy, dwarf, gnoll, kobold, goblin, imp ); type enumeration is ( gui_none, gui_button, gui_line, gui_text, gui_icon, gui_sprite, gui_orient ); ------------------------------------------------------------------------------------------ type gui_data is record kind : enumeration := gui_none; text : core.short_string := "- "; info : core.long_string := "- "; number : integer := 0; image : core.sprite := (others => 0); end record; empty : gui_data; type gui_array is array (natural range <>) of gui_data; type structure is record title : core.short_string := "- "; toggle : core.signal_code := core.signal_space; show : boolean := false; center : boolean := false; resize : boolean := false; x : integer := 0; y : integer := 0; width : integer := 0; height : integer := 0; gui_n : natural := 0; gui_list : access gui_array := null; end record; ------------------------------------------------------------------------------------------ active : style := main; ------------------------------------------------------------------------------------------ procedure configure; procedure synchronize; procedure write (text : in string; x, y : in integer); procedure draw_icon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle'access); procedure draw_overicon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle'access); procedure draw_text_box (text : in string); procedure draw_help_box (x, y, width, height : in integer; action : core.pointer := core.idle'access); procedure draw_frame (description : in string; x, y, width, height : in integer; action : core.pointer := core.idle'access); 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_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 (description : in string; x, y, width, height : in integer; action : core.pointer := core.idle'access); procedure draw_state_box (x, y : in integer); procedure add_structure (data : in structure); procedure add_structure_button (icon : in core.sprite; text : in core.short_string; description : in core.long_string := ""); ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ end ui;