DosMike / Mega Menus

Simple Menu API for Inventorys, Books and Chat
2
Download

Mega Menus

This menu API focuses on a fluent experience with redrawing inventories that do not reset the cursor on every click. A inventory menu with this API keeps the player inventory unlocked and thus allowes for the inventory menu to accept and output items in a controlled manner.

The API itself was influenced by java AWT/Swing but is Builder oriented. Additionally the API will automatically generate pagination for menus with elements put on different pages.

Supported menu elements are:

  • Icon - does nothing, but looks pretty
  • Button - has a click callback
  • Checkbox - can be toggled on and off, has a change callback, code can set tri-state
  • Spinner - add a list of values, has a change callback
  • Slot - can provide or accept single stacks of items (not shift-clickable), has a slot chagne callback

Additionally menus hold state objects for the menu and every player in the menu. These objects do not reset automatically and are persistent until the menu is GCed. Menus can be rendered as shared, potentially allowing multiple player to interact on the same instance, or create a bound instance, that provides a separate instance for all elements so interaction does not clash between viewers.

All Elements on the menu render with Icons, collections of ItemStacks that animates with a given FPS or frametime.

Need Help?

Join my Discord

Category: Developer Tools

Published on Mar 2, 2019

1261 views

2 stars

272 total downloads

Pages

Members