Class ColorPalette.ColorTable
java.lang.Object
com.pixelmonmod.api.client.screen.ColorPalette.ColorTable
- Enclosing class:
- ColorPalette
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Completely fills this color table with a given color for all screen designs and color schemes.get
(ScreenStyle.Design design, ScreenStyle.ColorScheme colorScheme) Retrieves a color from this table for the given style parameters.lock()
Locks this color table, preventing any modifications from taking place.boolean
set
(Color color, ScreenStyle.ColorScheme colorScheme) Sets a given color scheme to the same color for all screen designs.boolean
set
(Color color, ScreenStyle.Design design) Sets a given screen design to the same color for all color schemes.boolean
set
(Color color, ScreenStyle.Design design, ScreenStyle.ColorScheme colorScheme) Sets a color for a given screen design and color scheme.unlock()
Unlocks this color table, allowing modifications to take place.
-
Method Details
-
get
Retrieves a color from this table for the given style parameters.- Parameters:
design
- The current screen design.colorScheme
- The current screen color scheme.- Returns:
- The found color.
-
fill
Completely fills this color table with a given color for all screen designs and color schemes. This operation can fail if this table is marked as locked/immutable. It can be unlocked with the methodunlock()
.- Parameters:
color
- The color to fill with.- Returns:
- Whether this operation succeeded or not.
-
set
Sets a given screen design to the same color for all color schemes. This operation can fail if this table is marked as locked/immutable. It can be unlocked with the methodunlock()
.- Parameters:
color
- The color to set to.design
- The screen design to apply this color to.- Returns:
- Whether this operation succeeded or not.
-
set
Sets a given color scheme to the same color for all screen designs. This operation can fail if this table is marked as locked/immutable. It can be unlocked with the methodunlock()
.- Parameters:
color
- The color to set to.colorScheme
- The color scheme to apply this color to.- Returns:
- Whether this operation succeeded or not.
-
set
Sets a color for a given screen design and color scheme. This will only modify a single color position. This operation can fail if this table is marked as locked/immutable. It can be unlocked with the methodunlock()
.- Parameters:
color
- The color to set to.design
- The screen design to apply this color to.colorScheme
- The color scheme to apply this color to.- Returns:
- Whether this operation succeeded or not.
-
lock
Locks this color table, preventing any modifications from taking place.- Returns:
- This color table.
-
unlock
Unlocks this color table, allowing modifications to take place.- Returns:
- This color table.
-