Interface PaletteSettings
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The colours a user chose for one overlay, as
OverlayPalette.of(PaletteSettings) reads them: a built-in
PaletteSettings.Scheme, and for PaletteSettings.Scheme.CUSTOM a colour per PaletteSettings.Slot that replaces Classic's.
Back it with the plugin's config. A scheme picker alone is a method reference,
OverlayPalette.of(config::hudScheme) for a @ConfigItem returning PaletteSettings.Scheme; a custom scheme
also overrides color(Slot) and returns the config's Color items (null keeps Classic's colour).
Build the palette when the config changes or on the game tick and publish it with the overlay's snapshot; the
render thread reads the snapshot only.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe built-in colour schemes, the ones the Workflow Studio HUD offers.static enumThe colours of a palette, one perOverlayPalettefield. -
Method Summary
Modifier and TypeMethodDescriptiondefault Colorcolor(PaletteSettings.Slot slot) The user's colour for one slot of aPaletteSettings.Scheme.CUSTOMscheme.scheme()The chosen scheme.
-
Method Details
-
scheme
-
color
The user's colour for one slot of aPaletteSettings.Scheme.CUSTOMscheme. Not read for the other schemes. The alpha is ignored: palette colours are opaque, and transparency comes from the overlay's opacity.- Parameters:
slot- the palette colour- Returns:
- the colour, or null to keep Classic's
-