Class MenubarItemFile
java.lang.Object
com.thecsdev.betterstats.api.mcbs.view.menubar.MenubarItem
com.thecsdev.betterstats.mcbs.view.menubar.MenubarItemFile
- All Implemented Interfaces:
com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
MenubarItem implementation for "File".-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal @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.final @NotNull net.minecraft.network.chat.ComponentReturns the display name for thisMenubarItem, which is shown as the label in the menubar.static final voidshowOpenFileDialog(@NotNull net.minecraft.client.Minecraft client, @NotNull McbsEditor mcbsEditor) Shows the "Open File" dialog and handles loading the selectedMcbsFileinto a newMcbsEditorTab.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
MenubarItemFile
public MenubarItemFile()
-
-
Method Details
-
getDisplayName
@NotNull public final @NotNull net.minecraft.network.chat.Component getDisplayName()Description copied from class:MenubarItemReturns 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- Specified by:
getDisplayNamein classMenubarItem
-
createContextMenu
@NotNull public final @NotNull com.thecsdev.commonmc.api.client.gui.ctxmenu.TContextMenu createContextMenu(@NotNull @NotNull net.minecraft.client.Minecraft client, @NotNull @NotNull McbsEditor mcbsEditor) Description copied from class:MenubarItemCreates the context menu that is shown when thisMenubarItemis clicked in the menubar.- Specified by:
createContextMenuin classMenubarItem- Parameters:
client- TheMinecraftinstance the GUI belongs to.mcbsEditor- TheMcbsEditorGUI'sMcbsEditorinstance.
-
showOpenFileDialog
@Internal public static final void showOpenFileDialog(@NotNull @NotNull net.minecraft.client.Minecraft client, @NotNull @NotNull McbsEditor mcbsEditor) throws NullPointerException Shows the "Open File" dialog and handles loading the selectedMcbsFileinto a newMcbsEditorTab.- Parameters:
client- TheMinecraftclient instance.mcbsEditor- TheMcbsEditorinstance to add the new tab to.- Throws:
NullPointerException- If an argument isnull.
-