Skip to content

Buttons

LlaGuiTo edited this page Oct 4, 2026 · 1 revision

Buttons

Applies to SKD Menu 1.0.0 for Minecraft 1.21.1, and to 1.2.5 for 26.2.

Translation-safe by design

Before anything else, one thing worth knowing because it is unusual.

Most mods that customise the title screen find buttons by their text. That breaks the moment the player changes language. SKD Menu does the opposite: it identifies each vanilla button by widget type, hides it, and creates its own using Minecraft's own translation keys — menu.singleplayer, menu.multiplayer, menu.online, menu.options, menu.quit, gui.friends.open, options.language, the accessibility label, fml.menu.mods.

The consequence: your button labels stay correctly translated in whatever language the player is using, and moving, hiding or restyling them works identically regardless of language. You never hardcode text for a vanilla button.

The 9 vanilla buttons

buttons.defaults is generated pre-populated with all of them, so you can see what is available without guessing:

id Default
singleplayer visible
multiplayer visible
realms hidden
options visible
quit visible
friends visible
language hidden
accessibility hidden
mods visible
{ "id": "singleplayer", "x": 5, "y": 82, "width": 75, "hide": false, "image": "", "hideText": false }
Field Meaning
x, y Percentage 0–100 of window width/height. -1 = automatic.
width Pixels. -1 = the button's natural width.
hide true and the button is not created at all.
image Image for this button. Empty falls back to globalImage.
hideText true shows only the image, no label.

realms, language and accessibility are hidden by default — they are not useful to most players. Unhide realms if your pack does not use Realms.

Automatic width

width: -1 uses a sensible per-button width: 200px for singleplayer, multiplayer and realms; 98px for options and quit; or exactly the translated text plus 16px for friends, language, accessibility and mods.

There is a 20px minimum, always applied. A button narrower than its own text triggers Minecraft's text scrolling — and a scrolling button that is also animated can crash. Do not go below 20. See Compatibility.

Automatic grouping

friends, language, accessibility and mods are grouped automatically into one centred horizontal row, rendered as normal text buttons rather than the small square icons vanilla uses, so the width fits each language's label.

Custom buttons

Buttons that do not exist in vanilla:

{ "text": "Discord", "action": "open_url", "command": "https://discord.gg/...", "x": 40, "y": 85, "width": 200, "height": 20, "image": "", "hideText": false }
Field Meaning
text The label. This one is yours, so it does not auto-translate.
action What it does — see below.
command The command to run, or the URL to open.
x, y Percentage, and mandatory.
width, height Pixels.
image, hideText As above.

Actions

action Does
command Runs command as a chat/console command.
open_singleplayer Opens the singleplayer screen.
open_multiplayer Opens the multiplayer screen.
open_options Opens the options screen.
quit Quits the game.
open_url Opens command as a URL in the system browser.

x and y are required for a custom button to appear at all. Leave either at its default of -999 and the button is not created — it is not merely hidden. Set both explicitly.

Opening URLs

open_url hands the URL to the system browser. Worth remembering that this means a URL in your config can point anywhere; if you distribute a pack, that is a decision your players cannot see.

buttons.globalImage

One image applied to every button that has no image of its own — defaults and custom alike. Defaults to skd_menu:textures/gui/button_default.png. Set it to "" for no generic image, and buttons without their own fall back to the normal Minecraft look.

Hover feedback survives

A button with a custom image still reacts to the mouse and keyboard like a vanilla one: a translucent white overlay on hover or focus, darker when disabled. You do not lose the "this is clickable" signal just because you supplied a picture.

Entry animation

"buttonAnimation": {
  "type": "slide_right",
  "duration": 600,
  "offset": 300
}
Field Meaning
type "slide_right" animates; "none" or null disables.
duration Milliseconds for the entrance.
offset Pixels the buttons start from.

Only slide_right is implemented. Visible buttons slide in from the right on an ease-out curve over duration. Any other type value is reserved for future use and currently behaves as "none".

It fires once when the menu opens, across every widget visible at that moment — non-hidden default buttons plus custom buttons with a defined position.

Removing a button

Delete its entry, or set "defaults": [] for all of them. Either way those buttons get no configuration applied and fall back to the vanilla dynamic layout — they are not permanently hidden, which is the difference from "hide": true.

Clone this wiki locally