GUIs in staff++ have these main components:
- Container -> The inventory as we see it.
- Item -> One item in the container represented by an itemstack.
- Text -> Text consists of one or more TextParts.
- TextPart -> A TextPart holds certain written context.
The container is the inventory we are showing. Using styling we can change:
- The color of the title
- The size of the GUI
An Item is a wrapper around an itemstack. Using styling we can change.
- The location of the item
- The color of the name
The Text component is used whenever we want to display some sort of text inside the component. The component contains one or more TextParts. Text is used for the title of the GUI and the name or Lore of an ItemStack. Every TextPart can be changed using styling:
- TextPart can be hidden/shown
- Color of TextPart can be changed.
The above components can all be assigned 1 id and multiple classes.
An id is given to a component to identify it, we can use this id to reference the component inside our style configuration.
A class, just like an id, is used to reference a component. The main difference is that a class can reference multiple components. While an id must only reference one.
A class is also more lenient in how it can reference components.