Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

XML Documentation

Garkatron edited this page Jan 9, 2025 · 3 revisions

GUI Library XML Schema Documentation

This document explains the XML schema for defining GUI elements in a library. The schema is designed to structure a graphical user interface with reusable components, layouts, and containers.


General Information

  • Namespace: GUI-LIBRARY-HTML-SCHEMA
  • Target Namespace: GUI-LIBRARY-HTML-SCHEMA
  • Root Element: <root>

Elements

1. link

  • Purpose: Links external style files in .yaml format.
  • Attributes:
    • src (string): Specifies the path to the style file.

2. component

  • Purpose: Defines custom components by enclosing other elements within this tag.
  • Attributes (Inherited from LogicalElement):
    • src (string): Optional.
    • name (string): Required. Name of the component.

3. module

  • Purpose: Used within <component> tags to associate a module with a specific component.
  • Attributes (Inherited from LogicalElement):
    • src (string): Optional.
    • name (string): Required. Name of the module.

4. templates

  • Purpose: Acts as a container for modules.
  • Attributes (Inherited from LogicalElement):
    • src (string): Optional.
    • name (string): Required. Name of the template.

5. call

  • Purpose: Invokes components by specifying the domain in the component attribute.
  • Example: main.bui.test | main (templates.name), bui (module.name), test (component.name)
  • Attributes:
    • component (string): Name of the component to call.

6. test

  • Purpose: A reserved node for testing purposes. Only for developer use.
  • Attributes: Inherits all attributes from BaseNode.

7. slot

  • Purpose: Defines a slot for child elements. Only works within container tags.
  • Attributes:
    • maxItemAmount (integer): Maximum number of items allowed in the slot.
    • Inherits from BaseNode.

8. inventory

  • Purpose: Represents an inventory system.
  • Attributes: Inherits from BaseContainer.

9. playerInventory

  • Purpose: Displays the entire player inventory without specifying individual slots.
  • Attributes: Inherits from BaseContainer.

10. craftingTable

  • Purpose: Represents a crafting table. The crafting logic needs to be implemented separately.
  • Attributes: Inherits from BaseContainer.

11. container

  • Purpose: Serves as a container for organizing slots.
  • Attributes: Inherits from BaseContainer.

12. layout

  • Purpose: Used to create aesthetically pleasing layouts.
  • Attributes: Inherits from BaseLayout.

13. scrollableLayout

  • Purpose: Provides a scrollable layout.
  • Attributes:
    • maxScroll (string): Maximum scroll limit.
    • minScroll (string): Minimum scroll limit.

15. label

  • Purpose: Displays text in the GUI.
  • Attributes:
    • maxTextLength (unsignedInt): Maximum number of characters allowed in the text.

16. progressBar

  • Purpose: Displays a progress bar.
  • Attributes: Inherits from BasicNode.

17. button

  • Purpose: Represents a clickable button.
  • Attributes: Inherits from BaseNode.

18. draggableElement

  • Purpose: A dynamic element that can be dragged.
  • Attributes: Inherits from BaseNode.

19. image

  • Purpose: Displays an image in the GUI.
  • Attributes:
    • id (string): Identifier for the image.
    • group (string): Group to which the image belongs.
    • src (string): Path to the image file.

20. root

  • Purpose: The root element of the schema. It can include various elements or definitions.
  • Attributes:
    • version (string): The version of the schema. Allowed value: 1.0.

Complex Types

1. LogicalElement

  • Attributes:
    • src (string): Optional.
    • name (string): Required. Name of the logical element.

2. BasicNode

  • Attributes:
    • id (string): Node identifier.
    • group (string): Group to which the node belongs.

3. BaseNode

  • Inheritance: Extends BasicNode.
  • Allows: Any element from the schema namespace.

4. BaseContainer

  • Inheritance: Extends BaseNode.
  • Allows: <slot> elements.

5. BaseLayout

  • Inheritance: Extends BaseNode.
  • Attributes:
    • direction (string): Specifies layout direction. Allowed values:
      • vertical
      • horizontal

Clone this wiki locally