Sub-GUI Mod element

Started by Ali107 on

Topic category: Feature requests and ideas for MCreator

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sub-GUI Mod element

Basically, this "sub-GUI" mod element is supposed to allow the user to make "sub-GUIs", where the user has a similar editor as the GUI mod element, but they can be used to be inserted into other GUIs or overlays

 

So imagine you make your own energy bar for a mod, and you want to display it in multiple places. So how you would do it with this mod element is by creating a sub-GUI that has a progress bar to show the energy level, as well as a label naming the energy bar and/or displaying the energy number. (e.g. Energy: 78 / 100) Once the energy bar sub-GUI is made, you can open any GUI or overlay, and add it there. Maybe there's a new element within GUIs and overlays that adds sub-GUIs, and you can move them around.

Another example, if you have a GUI with multiple pages. Similar to websites, a user might need something similar to a navbar, where each page of the GUI has a consistent GUI elements used to navigate or any other uses.

 

As you can see, this helps make GUIs highly modular.

 

This could be accomplished code-wise by running rendering functions of the sub-GUI within the rendering functions of the main GUI (e.g. renderBg, renderLabels. etc). Button handling could use its own ButtonMessage class for the sub-GUI. But idk maybe I am thinking too shallowly for this.