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
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionColorSetting
(String name, Color value) ColorSetting
(String name, String description, int value) ColorSetting
(String name, String description, Color value) -
Method Summary
Modifier and TypeMethodDescriptionboolean
deserializeValue
(com.google.gson.JsonElement json) int
getAlpha()
int
getBlue()
float
int
getGreen()
float
getHue()
int
int
getRainbowWithOffset
(int offset) int
getRed()
float
getValue()
int
boolean
boolean
boolean
boolean
boolean
parseValue
(String string, boolean set) com.google.gson.JsonElement
setAlphaAllowed
(boolean hasAlpha) void
setAlphaAllowed
(int alpha) void
setBlue
(int blue) setChangeAction
(Runnable run) void
setGreen
(int green) void
setHue
(float hue) setRainbow
(boolean rainbow) setRainbowAllowed
(boolean hasRainbowOption) void
setRainbowMode
(ColorSetting.RainbowMode rainbowMode) void
setRainbowOffset
(int rainbowOffset) void
setRed
(int red) setThemeSync
(boolean themeSync) setThemeSyncAllowed
(boolean themeSyncAllowed) setVisibility
(BooleanSupplier tester) Methods inherited from class org.rusherhack.core.setting.Setting
addSubSettings, deserialize, getAllSubSettings, getConsumer, getDefaultValue, getDescription, getDisplayName, getFullName, getName, getParent, getSubSetting, getSubSettings, isHidden, isHiddenByDefault, reset, reset, serialize, setDefaultValue, setDescription, setHidden, setShouldSerialize, setValue, setValueObj, shouldSerialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.rusherhack.core.interfaces.INamed
getAliases
Methods inherited from interface org.rusherhack.core.serialize.ISerializable
shouldAutoSave
-
Constructor Details
-
ColorSetting
-
ColorSetting
-
ColorSetting
-
-
Method Details
-
getRealValue
-
getValue
- Overrides:
getValue
in classorg.rusherhack.core.setting.Setting<Color>
-
getDisplayValue
- Specified by:
getDisplayValue
in classorg.rusherhack.core.setting.Setting<Color>
-
getRainbowWithOffset
public int getRainbowWithOffset(int offset) -
getValueRGB
public int getValueRGB() -
isRainbow
public boolean isRainbow() -
setRainbow
-
isRainbowAllowed
public boolean isRainbowAllowed() -
setRainbowAllowed
-
getRainbowMode
-
setRainbowMode
-
getRainbowOffset
public int getRainbowOffset() -
setRainbowOffset
public void setRainbowOffset(int rainbowOffset) -
isAlphaAllowed
public boolean isAlphaAllowed() -
setAlphaAllowed
-
isThemeSync
public boolean isThemeSync() -
setThemeSync
-
isThemeSyncAllowed
public boolean isThemeSyncAllowed() -
setThemeSyncAllowed
-
parseValue
- Specified by:
parseValue
in classorg.rusherhack.core.setting.Setting<Color>
-
deserializeValue
public boolean deserializeValue(com.google.gson.JsonElement json) - Specified by:
deserializeValue
in classorg.rusherhack.core.setting.Setting<Color>
-
serializeValue
public com.google.gson.JsonElement serializeValue()- Specified by:
serializeValue
in classorg.rusherhack.core.setting.Setting<Color>
-
setVisibility
- Overrides:
setVisibility
in classorg.rusherhack.core.setting.Setting<Color>
-
setChangeAction
- Overrides:
setChangeAction
in classorg.rusherhack.core.setting.Setting<Color>
-
onChange
- Overrides:
onChange
in classorg.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()
-