GaldurTheme
classclient onlysince 0.1.0com.galdurstudio.galdurui.api.theme.GaldurTheme
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.
int accent = GaldurTheme.accent();int custom = GaldurTheme.colorOrDefault("mymod_energy", 0xFF3FC1D9);Fields 19
BACKGROUND
staticMain screen background (charcoal).
SURFACE
staticBackground of elements placed on the main background (lists, fields).
TEXT
staticMain text colour (cream).
TEXT_MUTED
staticSecondary, less contrasted text.
ACCENT
staticAccent colour at rest (redstone).
ACCENT_HOVER
staticAccent colour under the mouse or keyboard focus.
ACCENT_PRESSED
staticAccent colour while pressed.
EMBER
staticWarm secondary colour, for highlights (ember).
PANEL_PADDING
staticInner margin of a panel, between its edge and its contents.
GAP
staticGap between two neighbouring layout elements.
BUTTON_PADDING_X
staticHorizontal margin between a button edge and its label.
BUTTON_MIN_WIDTH
staticMinimum width of a button sized from its label.
BUTTON_HEIGHT
staticHeight of a button.
LIST_ROW_HEIGHT
staticHeight of a scrolling list row, text included.
SCROLLBAR_WIDTH
staticWidth of a scrollbar (lists and item grids).
FIELD_HEIGHT
staticHeight of a text field (search field).
TAB_HEIGHT
staticHeight of a tab row, bottom line included.
TAB_PADDING_X
staticHorizontal margin between a tab edge and its title.
PROGRESS_HEIGHT
staticHeight of a progress bar, frame included.
Methods 23
color
staticPARAMETERS
RETURNSint — the ARGB colour of key
colorOrDefault
staticPARAMETERS
RETURNSint — the ARGB colour of key, or fallback if the theme does not define
it
has
staticPARAMETERS
RETURNSboolean — true if the current theme defines the colour key
background
staticRETURNSint — the BACKGROUND colour, ARGB
surface
staticRETURNSint — the SURFACE colour, ARGB
text
staticRETURNSint — the TEXT colour, ARGB
textMuted
staticRETURNSint — the TEXT_MUTED colour, ARGB
accent
staticRETURNSint — the ACCENT colour, ARGB
accentHover
staticRETURNSint — the ACCENT_HOVER colour, ARGB
accentPressed
staticRETURNSint — the ACCENT_PRESSED colour, ARGB
ember
staticRETURNSint — the EMBER colour, ARGB
spacing
staticPARAMETERS
RETURNSint — the spacing of key, in GUI pixels
panelPadding
staticRETURNSint — the PANEL_PADDING spacing, in pixels
gap
staticRETURNSint — the GAP spacing, in pixels
listRowHeight
staticRETURNSint — the LIST_ROW_HEIGHT spacing, in pixels
scrollbarWidth
staticRETURNSint — the SCROLLBAR_WIDTH spacing, in pixels
fieldHeight
staticRETURNSint — the FIELD_HEIGHT spacing, in pixels
tabHeight
staticRETURNSint — the TAB_HEIGHT spacing, in pixels
tabPaddingX
staticRETURNSint — the TAB_PADDING_X spacing, in pixels
progressHeight
staticRETURNSint — the PROGRESS_HEIGHT spacing, in pixels