# Open your menu

> Every way a player reaches a registered menu - the Options screen button, the Mod menus list, the mod list's Config button and your own code.

URL: https://xichil.dev/docs/xis-mvui/v1/guides/opening-menus/ · Updated: 2026-11-06 · Applies to: Fabric, Quilt, Legacy Fabric, Forge, NeoForge, MC 1.7.10 - 26.3

Once registered, a menu can be opened in up to three ways. The first two need no code.

## The Options screen

The library adds one button to the game's Options screen:

| Registered menus | The button reads | It opens |
| --- | --- | --- |
| Only yours | your `ScreenFactory.buttonLabel()` (default **Menu...**) | your menu |
| Several | **Mod menus...** | a "Mod menus" list with one button per mod, labelled with the `name` passed to `register` |

Override `buttonLabel()` to name the button after your mod. Vanilla's convention ends labels that open a screen
with `...`:

```java
@Override
public Text buttonLabel() {
    return Text.translatable("mymod.menu", "My Mod...");
}
```

When a mod's menu has turned off after an error, its button in the "Mod menus" list is greyed out (see
[Failure isolation](https://xichil.dev/docs/xis-mvui/v1/concepts/failure-isolation/index.md)).

## The mod list's Config button

| Loader | What you do |
| --- | --- |
| Forge 1.13.2 – 26.3, NeoForge | Nothing, as long as `register` runs in your `@Mod` constructor. |
| Fabric and Quilt with Mod Menu | Nothing: it works for every mod that depends on `xis_mvui`. |
| Forge 1.8 – 1.12.2 | `guiFactory = MultiversionUi.LEGACY_FORGE_GUI_FACTORY` in your `@Mod`. |
| Forge 1.7.10 | `guiFactory = MultiversionUi.CPW_FORGE_GUI_FACTORY` in your `@Mod`. |

If the library can't add a mod's menu to the mod list, it logs that and the Options screen button still works.

## From your own code

To open the menu from your own key binding or a button on another screen, ask for it as the running version's
screen object:

```java
Object screen = MultiversionUi.menuScreen("mymod", currentScreen);
```

- `parent` is the vanilla screen to return to when the player closes the menu, or `null` to return to the game.
- The result is typed `Object` because the API has no Minecraft classes. Cast it to the version's screen class
  and show it with the game's own call, for example
  `Minecraft.getInstance().setScreen((Screen) screen)` on recent versions. The method and class names depend
  on the version and mappings, so this line belongs in your version-specific code
  (see [Build one mod for every loader](https://xichil.dev/docs/xis-mvui/v1/guides/multiversion-mod/index.md#5-keep-minecraft-out-of-the-shared-code)).
- It returns `null` when your mod registered no menu, when there is no backend for the running game, or when
  every menu is off. Check before casting.
- If only your menu is off, it returns a screen that tells the player so.
- Call it on the main thread. It never throws.

## Next steps

- [Several screens and dialogs](https://xichil.dev/docs/xis-mvui/v1/guides/navigation/index.md): what happens after the first screen.
- [Key bindings](https://xichil.dev/docs/xis-mvui/v1/guides/keybinds/index.md): storing the key that opens your menu.
