SomeSourceCode / SomeGuiApi

A Paper API to create interactable GUIs using Minecraft Inventories, ...
MIT License
1 stars 0 forks source link

Parent GUIs #24

Closed SomeSourceCode closed 1 month ago

SomeSourceCode commented 2 months ago

Description

GUIs should support parent GUIs, allowing automatic navigation to the parent when the child GUI is closed. The title should reflect the parent-child relationship. For instance, if a GUI titled "Settings" has a parent GUI titled "Home", the title should display as "Home > Settings".

Expected Code

Gui parentGui = ...;
Gui gui = ...:
gui.setParent(parentGui);

Challenges

SomeSourceCode commented 1 month ago

Current Status

Challenges

Reflecting the parent-child relationship in the title is difficult with the current Adventure Component API. Implementing this feature would require complex calculations to truncate/abbreviate components to meet the title length requirements.

Next Steps

Given the successful implementation of the navigation feature and the significant challenges with updating titles, I propose the following:

  1. Close the Issue: Mark the issue as completed for the navigation part.
  2. Create a New Issue: Potentially open a new issue specifically for the title update feature.