Aller au contenu
galdurdocs

GaldurTheme

classclient uniquementdepuis 0.1.0

com.galdurstudio.galdurui.api.theme.GaldurTheme

Pas encore traduit : texte d’origine en anglais.

Colours and spacings of the Galdur UI theme.

Values come from assets/galdurui/theme.json and are reloaded with the game resources (F3+T, or a resource pack change). Read them every frame or every init(); never cache them in a static final field. Colours are packed ARGB (0xAARRGGBB), the format Minecraft's rendering methods expect.

Example.java
int accent = GaldurTheme.accent();int custom = GaldurTheme.colorOrDefault("mymod_energy", 0xFF3FC1D9);
public final class GaldurTheme
PAQUETapi.theme
CÔTÉclient uniquement
THREADthread client

Champs 19

BACKGROUND

static
public static final String BACKGROUND = "background"

Main screen background (charcoal).

SURFACE

static
public static final String SURFACE = "surface"

Background of elements placed on the main background (lists, fields).

TEXT

static
public static final String TEXT = "text"

Main text colour (cream).

TEXT_MUTED

static
public static final String TEXT_MUTED = "text_muted"

Secondary, less contrasted text.

ACCENT

static
public static final String ACCENT = "accent"

Accent colour at rest (redstone).

ACCENT_HOVER

static
public static final String ACCENT_HOVER = "accent_hover"

Accent colour under the mouse or keyboard focus.

ACCENT_PRESSED

static
public static final String ACCENT_PRESSED = "accent_pressed"

Accent colour while pressed.

EMBER

static
public static final String EMBER = "ember"

Warm secondary colour, for highlights (ember).

PANEL_PADDING

static
public static final String PANEL_PADDING = "panel_padding"

Inner margin of a panel, between its edge and its contents.

GAP

static
public static final String GAP = "gap"

Gap between two neighbouring layout elements.

BUTTON_PADDING_X

static
public static final String BUTTON_PADDING_X = "button_padding_x"

Horizontal margin between a button edge and its label.

BUTTON_MIN_WIDTH

static
public static final String BUTTON_MIN_WIDTH = "button_min_width"

Minimum width of a button sized from its label.

BUTTON_HEIGHT

static
public static final String BUTTON_HEIGHT = "button_height"

Height of a button.

LIST_ROW_HEIGHT

static
public static final String LIST_ROW_HEIGHT = "list_row_height"

Height of a scrolling list row, text included.

SCROLLBAR_WIDTH

static
public static final String SCROLLBAR_WIDTH = "scrollbar_width"

Width of a scrollbar (lists and item grids).

FIELD_HEIGHT

static
public static final String FIELD_HEIGHT = "field_height"

Height of a text field (search field).

TAB_HEIGHT

static
public static final String TAB_HEIGHT = "tab_height"

Height of a tab row, bottom line included.

TAB_PADDING_X

static
public static final String TAB_PADDING_X = "tab_padding_x"

Horizontal margin between a tab edge and its title.

PROGRESS_HEIGHT

static
public static final String PROGRESS_HEIGHT = "progress_height"

Height of a progress bar, frame included.

Méthodes 23

color

static
public static int color(String key)

PARAMÈTRES

keyStringcolour name; see the constants of this class

RENVOIEint — the ARGB colour of key

colorOrDefault

static
public static int colorOrDefault(String key, int fallback)

PARAMÈTRES

keyString—
fallbackint—

RENVOIEint — the ARGB colour of key, or fallback if the theme does not define it

has

static
public static boolean has(String key)

PARAMÈTRES

keyString—

RENVOIEboolean — true if the current theme defines the colour key

background

static
public static int background()

RENVOIEint — the BACKGROUND colour, ARGB

surface

static
public static int surface()

RENVOIEint — the SURFACE colour, ARGB

text

static
public static int text()

RENVOIEint — the TEXT colour, ARGB

textMuted

static
public static int textMuted()

RENVOIEint — the TEXT_MUTED colour, ARGB

accent

static
public static int accent()

RENVOIEint — the ACCENT colour, ARGB

accentHover

static
public static int accentHover()

RENVOIEint — the ACCENT_HOVER colour, ARGB

accentPressed

static
public static int accentPressed()

RENVOIEint — the ACCENT_PRESSED colour, ARGB

ember

static
public static int ember()

RENVOIEint — the EMBER colour, ARGB

spacing

static
public static int spacing(String key)

PARAMÈTRES

keyStringspacing name; see the constants of this class

RENVOIEint — the spacing of key, in GUI pixels

panelPadding

static
public static int panelPadding()

RENVOIEint — the PANEL_PADDING spacing, in pixels

gap

static
public static int gap()

RENVOIEint — the GAP spacing, in pixels

buttonPaddingX

static
public static int buttonPaddingX()

RENVOIEint — the BUTTON_PADDING_X spacing, in pixels

buttonMinWidth

static
public static int buttonMinWidth()

RENVOIEint — the BUTTON_MIN_WIDTH spacing, in pixels

buttonHeight

static
public static int buttonHeight()

RENVOIEint — the BUTTON_HEIGHT spacing, in pixels

listRowHeight

static
public static int listRowHeight()

RENVOIEint — the LIST_ROW_HEIGHT spacing, in pixels

scrollbarWidth

static
public static int scrollbarWidth()

RENVOIEint — the SCROLLBAR_WIDTH spacing, in pixels

fieldHeight

static
public static int fieldHeight()

RENVOIEint — the FIELD_HEIGHT spacing, in pixels

tabHeight

static
public static int tabHeight()

RENVOIEint — the TAB_HEIGHT spacing, in pixels

tabPaddingX

static
public static int tabPaddingX()

RENVOIEint — the TAB_PADDING_X spacing, in pixels

progressHeight

static
public static int progressHeight()

RENVOIEint — the PROGRESS_HEIGHT spacing, in pixels

© 2026 Galdur Studio · galdurstudio.com · Discord · LGPL-3.0-onlyProduit non officiel. Non approuvé par Mojang ou Microsoft, ni associé à eux.