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.

41 lines
1.4KB

  1. -- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
  2. --
  3. -- GNU General Public Licence (version 3 or later)
  4. with core, ui, attribute;
  5. package body attribute is
  6. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7. sprite : array (enumeration) of core.sprite;
  8. ------------------------------------------------------------------------------------------
  9. procedure configure is
  10. structure : ui.structure;
  11. begin
  12. core.echo (core.comment, "Configuring attribute components...");
  13. --
  14. structure.title := "Attribute Menu ";
  15. structure.toggle := core.signal_a;
  16. structure.show := false;
  17. structure.center := false;
  18. structure.resize := true;
  19. structure.x := 60;
  20. structure.y := 80;
  21. structure.gui_n := count;
  22. --
  23. ui.add_structure (structure);
  24. --
  25. for index in enumeration loop
  26. sprite (index) := core.import_sprite ("./sprite/attribute/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
  27. --
  28. ui.add_structure_button (sprite (index), trait (index).name, trait (index).text);
  29. end loop;
  30. end configure;
  31. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  32. end attribute;