GaldurProgressBar
classclient uniquementdepuis 0.1.0com.galdurstudio.galdurui.api.widget.GaldurProgressBar
Pas encore traduit : texte d’origine en anglais.
Themed progress bar, with an optional text centred on it, usable in vanilla layouts.
Like GaldurScrollList, the widget keeps neither the progress nor the text: it
reads them every frame from suppliers, so the bar can move every tick without
being rebuilt.
double[] progress = {0.25};column.addChild(GaldurProgressBar.of(120, () -> progress[0], () -> Component.literal("16 / 64")));- Fill: left to right, a gradient from
accent(redstone) toemberover the full width, so the head warms up as it moves. Sunken track (fieldsprite tintedbackground); the head column is lightened to mark the front. - Animation: the bar slides to its new value instead of jumping (it goes back at once, so a reset is clean), and a shine runs along the filled part while it is not full.
- Text: centred, in
textwith shadow; cut with "…" when too long. Without text (null) the bar is alone. - Disabled (
active = false): flat fill andtext_mutedtext, no animation.
The bar is not interactive: it takes neither focus nor clicks. Height from the theme:
spacing.progress_height.
Constructeurs 1
GaldurProgressBar
protectedPrefer of().
PARAMÈTRES
0 (empty) to 1 (full), called
every frame; values outside are clampednull for noneMéthodes 4
of
static2 surchargesPARAMÈTRES
0 to 1, called every framenull for noneRENVOIEGaldurProgressBar — a progress bar without text, at (0, 0) for a layout to place
preferredWidth
staticPARAMÈTRES
null for noneRENVOIEint — the width that shows label in full on the bar, or minWidth if larger
clicked
protectedA progress bar is not clickable: no sound, no mouse focus.
PARAMÈTRES
nextFocusPath
A progress bar is skipped by keyboard navigation (Tab, arrows).
PARAMÈTRES