Interface ModPopupMenu
public interface ModPopupMenu
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe action when the menu button is clicked. -
Method Summary
Modifier and TypeMethodDescriptionaddMenuItem(String label, ModPopupMenu.Action action) Adds a button with an action when clicked to the popup menu.addMenuItemScreen(String label, net.minecraft.client.gui.screens.Screen screen) Helper method to display a screen on top of the fullscreen map when a user clicks the option.createSubItemList(String label) Creates a sublist popup menu.
-
Method Details
-
addMenuItem
Adds a button with an action when clicked to the popup menu.- Parameters:
label- - The label, can be the display string or i18n key.action- - The action - this is an anonymous function, similar to Button.onPress
-
addMenuItemScreen
Helper method to display a screen on top of the fullscreen map when a user clicks the option.- Parameters:
label- - The label, can be the display string or i18n key.screen- - The screen.
-
createSubItemList
Creates a sublist popup menu.- Parameters:
label- - The label, can be the display string or i18n key.- Returns:
- - the menu for the sublist.
-