Skip to content
InputBooster
Developer DocumentationScreens

Settings UI

How the InputBooster settings screens are built: the panel layout, the seven tabs, the profiles screen and the alpha warning.

3 min readInputBooster 4.1.2-alphaMinecraft 26.2 / 26.3

The settings screen is hand-built on Minecraft's Screen API. There is no widget library and no layout engine: every row is placed by coordinate.

The panel

The screen draws a floating panel over the vanilla options screen rather than replacing it.

ConstantValuePurpose
RAIL_WIDTH100The width of the tab rail
HEADER_H44The header height, which is also the drag area
MIN_PANEL_W380The minimum width
MIN_PANEL_H260The minimum height

The panel opens at up to 560 x 460, clamped to the window. The position is centred on the first open.

java
int maxW = Math.max(MIN_PANEL_W, this.width - 16);
int maxH = Math.max(MIN_PANEL_H, this.height - 8);
panelW = savedPanelW == 0 ? Math.min(560, maxW) : clamp(savedPanelW, MIN_PANEL_W, maxW);
panelH = savedPanelH == 0 ? Math.min(460, maxH) : clamp(savedPanelH, MIN_PANEL_H, maxH);

Moving and resizing

GestureResult
Drag inside the headerMoves the panel
Drag the bottom-right gripResizes the panel, down to 380 x 260
Wheel over the contentScrolls the content
Drag the scrollbarScrolls the content

The content area scrolls; the tab rail and the footer do not. Rows that do not fit the viewport are hidden rather than drawn over the header or the footer.

Session-only geometry

The size and position are held in static fields:

java
private static int savedPanelW, savedPanelH;
private static int savedPanelX = Integer.MIN_VALUE;
private static int savedPanelY = Integer.MIN_VALUE;

They survive closing and reopening the screen within one session and are never written to the config file. A view preference is not a mod setting.

The seven tabs

java
private enum Tab {
    OVERVIEW("Overview"),
    KEYBOARD("Keyboard"),
    MOUSE("Mouse"),
    OVERLAY("Overlay"),
    PERFORMANCE("Performance"),
    COMPATIBILITY("Compatibility"),
    ADVANCED("Advanced");
}

Each tab has a one-line description under its name in the rail, for example Live state, active features, session summary for Overview and Other input mods and fallback behaviour for Compatibility.

Switching tabs rebuilds the widgets:

java
switch (tab) {
    case OVERVIEW -> buildOverview();
    case KEYBOARD -> buildKeyboard();
    ...
}

Widgets

The screen uses four custom widget types, all built in the same file.

WidgetBehaviour
SettingSliderInteger-backed. Floats are stored as hundredths, so overlay_scale is a slider from 50 to 300
ToggleA button that flips a boolean config value
Action buttonRuns a lambda — resync, reset counters, open the profiles screen
Text rowA label drawn directly, not as a widget

Every widget writes a real config value through the setter, and sets hasChanges = true.

Saving and closing

java
@Override
public void onClose() {
    if (hasChanges) InputBoosterConfig.save();
    if (this.minecraft != null) this.minecraft.setScreenAndShow(parent);
}

The footer has two buttons:

ButtonBehaviour
Save & CloseSaves if anything changed, then closes
CloseCloses without forcing a save

Because the values apply immediately, "Close" only skips the write. The file is written again at shutdown.

The profiles screen

ProfilesScreen is a separate screen with the same visual language: one back button, the same palette, the same row rhythm.

It offers a Save button per profile, a Load button and a Delete button per profile, and a Back button. It is reached from the Advanced tab through Manage profiles.

The alpha warning screen

KeyboardHandlerWarningScreen is shown before the custom keyboard handler is enabled. It exists because the handler is alpha: an untested Minecraft or mod combination can route input differently, and the handler may then pass a key twice or drop it.

While the handler is on, a red line stays on the settings screen and the overlay adds a warning line.