A Minecraft GUI system to serve as an alternative to Chest and Villager GUIs.
This Datapack uses an ingame editor to create floating item displays that will serve as either empty windows, item windows or text windows, where you can edit things such as window rotation, size, color, etc.
It was made with the objective of creating a GUI system which has access to more features than similar systems, such as Chest and Villager GUIs; By giving developers the freedom of creating Menus, Settings, Custom text windows, and many more in an intuitive manner and infinitely customizable.
Warning
While this datapack supports multiplayer, there cannot be more than 1 player with the editor active. Always make sure that only 1 player has it active, or else the editor tools will not work as intended.
The editor can be activated/deactivated by executing the toggle function:
/function ghost_gui:editor/toggleWith it, you will be able to create, color, move, rotate, resize, edit and delete them.
By left clicking an existing window with the color tool, you will replace that window's background with glass panes of the respective color of the dye selected, which can be cycled through by right clicking.

By left clicking an existing window with the move tool, you will make the selected window face your position.
By right clicking an existing window with the move tool, you will move the selected window to your cursor position.

Tip
Use the same key again to unselect the window.
Both modes can be used at the same time.
Left click a window to decrease its size, and right click to increase it.
Note
If you are not happy with the default sizes and resizing limits, you are able to bypass them by modifying them directly from a load function
Right click with the anchor tool to summon an Anchor Point, which will be the center point of your layout and serve as a reference point for the player's position. Its displayed as a bubble particle arrow on the ground. Only 1 Anchor point may exist at once.
Left click to delete the existing one.
Note
Make sure to create the anchor point before planning out your layout, as the anchor point spawns at a fixed rotation.
The create tool has 3 different window types: Empty, Item Slot and Text Box, which can be cycled through by right clicking. Left click to create the selected window type at the cursor's position.
Right click the delete tool to cycle between deletion types, the 2 being for deleting the window entirely, and the other for deleting only its contents. Left click to apply the deletion type to the window you are facing.
For this datapack, you can equip each window with different types of functions, such as:
- Load: A function that will only trigger in the moment the layout is loaded from storage
- Tick: A function that will trigger every tick for that window
- Click: A function that will trigger when any player right clicks or left clicks the window
- Hover: A function that will trigger when any player is directly facing the window
- Hover_text: A function that should contain a /data merge or /data modify for a text display's content, which will appear in the player's screen as a separate window when they are facing original window.
Note
As of now, the best way of editing the functions of a window is through the mod Axiom, as it contains a tool that allows you to directly alter a marker's NBT data. Another method will be worked on for later versions.

For you to save a layout, you can use the save function in the following manner:
/function ghost_gui:save {slot:<SAVE NAME HERE>}This will save the current window layout to the storage ghost_gui main.saves., and as such, the name given to it must be a valid storage name.

And for loading the layout back from storage, you can use the load start function in the following manner:
/function ghost_gui:load/start {slot:<SAVE NAME HERE>}The layout stored to that name will then be spawned at the player's location and facing direction, with the windows displaced according to the previous anchor position. After the layout is loaded, the windows will then exit editable mode and the equipped functions will now be active and working according to their type.

Warning
As of now, you cannot load a layout from storage for further editing, this shall come in a future update.











