Class MenubarItem
java.lang.Object
com.thecsdev.betterstats.api.mcbs.view.menubar.MenubarItem
- All Implemented Interfaces:
com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
- Direct Known Subclasses:
MenubarItemAbout, MenubarItemFile, MenubarItemView
@Environment(CLIENT)
public abstract class MenubarItem
extends Object
implements com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
Represents a single button in
McbsEditorGUI's menubar.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract @NotNull com.thecsdev.commonmc.api.client.gui.ctxmenu.TContextMenucreateContextMenu(@NotNull net.minecraft.client.Minecraft client, @NotNull McbsEditor mcbsEditor) Creates the context menu that is shown when thisMenubarItemis clicked in the menubar.abstract @NotNull net.minecraft.network.chat.ComponentReturns the display name for thisMenubarItem, which is shown as the label in the menubar.
-
Constructor Details
-
MenubarItem
public MenubarItem()
-
-
Method Details
-
getDisplayName
@NotNull public abstract @NotNull net.minecraft.network.chat.Component getDisplayName()Returns the display name for thisMenubarItem, which is shown as the label in the menubar.- Specified by:
getDisplayNamein interfacecom.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
-
createContextMenu
@NotNull public abstract @NotNull com.thecsdev.commonmc.api.client.gui.ctxmenu.TContextMenu createContextMenu(@NotNull @NotNull net.minecraft.client.Minecraft client, @NotNull @NotNull McbsEditor mcbsEditor) Creates the context menu that is shown when thisMenubarItemis clicked in the menubar.- Parameters:
client- TheMinecraftinstance the GUI belongs to.mcbsEditor- TheMcbsEditorGUI'sMcbsEditorinstance.
-