Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
library:inventorygui:usage [2025/04/18 12:43] – [Creating the GUI] Add mention of component page phoenix616library:inventorygui:usage [2025/04/18 12:45] (current) – [Creating the GUI] phoenix616
Line 28: Line 28:
 ``` ```
  
-If you want to use more advanced formatting of text with RGB colors then take a look at [[library:inventorygui:components|this page]] on how to do that.+If you want to use more advanced formatting of text with RGB colors then take a look at [[library:inventorygui:components|this page]] on how to do create an `InventoryGui` instance which can do that.
  
 ## Adding to the GUI ## Adding to the GUI
Line 117: Line 117:
 You can also set the state directly via `GuiStateElement#setState(String key)` You can also set the state directly via `GuiStateElement#setState(String key)`
 before you show the GUI or re-draw it. before you show the GUI or re-draw it.
- 
 ### Dynamic Element ### Dynamic Element
 You can also dynamically load elements each time the GUI is re-drawn and for each viewing player individually. E.g. when you want to cache GUIs but not the text of some buttons, display different elements per player or dynamically change them while they are open without closing and reopening them. You can also dynamically load elements each time the GUI is re-drawn and for each viewing player individually. E.g. when you want to cache GUIs but not the text of some buttons, display different elements per player or dynamically change them while they are open without closing and reopening them.
Line 134: Line 133:
 })); }));
 ``` ```
-As you can see you can change the content of a DynamicGuiElement after a player click on it by calling `InventoryGui#draw` in the action of the supplied element.+As you can see you can change the content of a DynamicGuiElement after a player clicks on it by calling `InventoryGui#draw` in the action of the supplied element.
  
 ### Element Group ### Element Group