Prototype game engine for Heroes of Might & Magic, featuring a gameplay plot-twist...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.9KB

  1. -- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
  2. --
  3. -- GNU General Public Licence (version 3 or later)
  4. with core;
  5. package ui is
  6. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7. type style is (
  8. main,
  9. fairy, dwarf, gnoll, kobold, goblin, imp
  10. );
  11. --~type enumeration is (
  12. --~gui_button, gui_line, gui_text, gui_icon, gui_sprite, gui_list
  13. --~);
  14. ------------------------------------------------------------------------------------------
  15. --~type gui_data is record
  16. --~text : string;
  17. --~number : integer;
  18. --~image : core.sprite;
  19. --~end record;
  20. type structure is record
  21. title : core.short_string := "- ";
  22. toggle : core.signal_code := core.signal_space;
  23. show : boolean := false;
  24. center : boolean := false;
  25. resize : boolean := false;
  26. x : integer := 0;
  27. y : integer := 0;
  28. width : integer := 0;
  29. height : integer := 0;
  30. end record;
  31. ------------------------------------------------------------------------------------------
  32. active : style := main;
  33. prioritize : boolean := false;
  34. ------------------------------------------------------------------------------------------
  35. procedure configure;
  36. procedure synchronize;
  37. procedure write (text : in string; x, y : in integer);
  38. procedure draw_icon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle'access);
  39. procedure draw_overicon (data : in core.sprite; description : in string; x, y : in integer; action : core.pointer := core.idle'access);
  40. procedure draw_text_box (text : in string);
  41. procedure draw_help_box (x, y, width, height : in integer; action : core.pointer := core.idle'access);
  42. procedure draw_frame (description : in string; x, y, width, height : in integer; action : core.pointer := core.idle'access);
  43. procedure draw_title_bar (x, y, width : in integer; title : in string);
  44. procedure draw_fill_bar (x, y, width : in integer; fill : in float);
  45. procedure draw_scroll_bar (x, y, height : in integer; offset : in integer);
  46. procedure draw_menu (x, y, width, height : in integer);
  47. procedure draw_tiny_menu (x, y, width, height : in integer);
  48. procedure draw_icon_menu (description : in string; x, y, width, height : in integer; action : core.pointer := core.idle'access);
  49. procedure draw_state_box (x, y : in integer);
  50. procedure add_structure (data : in structure);
  51. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  52. end ui;