Class ColorPalette.ColorTable

java.lang.Object
com.pixelmonmod.api.client.screen.ColorPalette.ColorTable
Enclosing class:
ColorPalette

public static class ColorPalette.ColorTable extends Object
  • Method Details

    • get

      public Color get(ScreenStyle.Design design, ScreenStyle.ColorScheme colorScheme)
      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

      public boolean fill(Color color)
      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 method unlock().
      Parameters:
      color - The color to fill with.
      Returns:
      Whether this operation succeeded or not.
    • set

      public boolean set(Color color, ScreenStyle.Design design)
      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 method unlock().
      Parameters:
      color - The color to set to.
      design - The screen design to apply this color to.
      Returns:
      Whether this operation succeeded or not.
    • set

      public boolean set(Color color, ScreenStyle.ColorScheme colorScheme)
      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 method unlock().
      Parameters:
      color - The color to set to.
      colorScheme - The color scheme to apply this color to.
      Returns:
      Whether this operation succeeded or not.
    • set

      public boolean set(Color color, ScreenStyle.Design design, ScreenStyle.ColorScheme colorScheme)
      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 method unlock().
      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

      public ColorPalette.ColorTable lock()
      Locks this color table, preventing any modifications from taking place.
      Returns:
      This color table.
    • unlock

      public ColorPalette.ColorTable unlock()
      Unlocks this color table, allowing modifications to take place.
      Returns:
      This color table.