Class ColorSetting

java.lang.Object
org.rusherhack.core.setting.Setting<Color>
org.rusherhack.client.api.setting.ColorSetting
All Implemented Interfaces:
org.rusherhack.core.feature.IFeature, org.rusherhack.core.interfaces.IHideable, org.rusherhack.core.interfaces.INamed, org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>, org.rusherhack.core.serialize.JsonSerializable

public class ColorSetting extends org.rusherhack.core.setting.Setting<Color>
  • Constructor Details

    • ColorSetting

      public ColorSetting(String name, Color value)
    • ColorSetting

      public ColorSetting(String name, String description, int value)
    • ColorSetting

      public ColorSetting(String name, String description, Color value)
  • Method Details

    • getRealValue

      public Color getRealValue()
    • getValue

      public Color getValue()
      Overrides:
      getValue in class org.rusherhack.core.setting.Setting<Color>
    • getDisplayValue

      public String getDisplayValue()
      Specified by:
      getDisplayValue in class org.rusherhack.core.setting.Setting<Color>
    • getRainbowWithOffset

      public int getRainbowWithOffset(int offset)
    • getValueRGB

      public int getValueRGB()
    • isRainbow

      public boolean isRainbow()
    • setRainbow

      public ColorSetting setRainbow(boolean rainbow)
    • isRainbowAllowed

      public boolean isRainbowAllowed()
    • setRainbowAllowed

      public ColorSetting setRainbowAllowed(boolean hasRainbowOption)
    • getRainbowMode

      public ColorSetting.RainbowMode getRainbowMode()
    • setRainbowMode

      public void setRainbowMode(ColorSetting.RainbowMode rainbowMode)
    • getRainbowOffset

      public int getRainbowOffset()
    • setRainbowOffset

      public void setRainbowOffset(int rainbowOffset)
    • isAlphaAllowed

      public boolean isAlphaAllowed()
    • setAlphaAllowed

      public ColorSetting setAlphaAllowed(boolean hasAlpha)
    • isThemeSync

      public boolean isThemeSync()
    • setThemeSync

      public ColorSetting setThemeSync(boolean themeSync)
    • isThemeSyncAllowed

      public boolean isThemeSyncAllowed()
    • setThemeSyncAllowed

      public ColorSetting setThemeSyncAllowed(boolean themeSyncAllowed)
    • parseValue

      public Color parseValue(String string, boolean set)
      Specified by:
      parseValue in class org.rusherhack.core.setting.Setting<Color>
    • deserializeValue

      public boolean deserializeValue(com.google.gson.JsonElement json)
      Specified by:
      deserializeValue in class org.rusherhack.core.setting.Setting<Color>
    • serializeValue

      public com.google.gson.JsonElement serializeValue()
      Specified by:
      serializeValue in class org.rusherhack.core.setting.Setting<Color>
    • setVisibility

      public ColorSetting setVisibility(BooleanSupplier tester)
      Overrides:
      setVisibility in class org.rusherhack.core.setting.Setting<Color>
    • setChangeAction

      public ColorSetting setChangeAction(Runnable run)
      Overrides:
      setChangeAction in class org.rusherhack.core.setting.Setting<Color>
    • onChange

      public ColorSetting onChange(Consumer<Color> consumer)
      Overrides:
      onChange in class org.rusherhack.core.setting.Setting<Color>
    • getRed

      public int getRed()
    • setRed

      public void setRed(int red)
    • getGreen

      public int getGreen()
    • setGreen

      public void setGreen(int green)
    • getBlue

      public int getBlue()
    • setBlue

      public void setBlue(int blue)
    • getAlpha

      public int getAlpha()
    • setAlphaAllowed

      public void setAlphaAllowed(int alpha)
    • setHue

      public void setHue(float hue)
      Parameters:
      hue - 0-1
    • getHue

      public float getHue()
    • getSaturation

      public float getSaturation()
    • getBrightness

      public float getBrightness()