mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 08:11:31 +01:00
(fix) color pickers now start where you left off
This commit is contained in:
parent
d2bba6f5f1
commit
c844a80e5f
@ -39,7 +39,10 @@ public class ColorPicker extends SilentScreen {
|
|||||||
this.value = value;
|
this.value = value;
|
||||||
float colorY = 80;
|
float colorY = 80;
|
||||||
int colorX = 3;
|
int colorX = 3;
|
||||||
|
Setting setting = Client.getInstance().getSettingsManager().getSettingByName(mod, this.value);
|
||||||
hsb = new HSBPicker((int)colorX, (int)colorY, 120, 70, true, value);
|
hsb = new HSBPicker((int)colorX, (int)colorY, 120, 70, true, value);
|
||||||
|
float[] vals = Color.RGBtoHSB(setting.getValColor().getRed(),setting.getValColor().getGreen(),setting.getValColor().getBlue(), null);
|
||||||
|
hsb.color = new float[] {vals[0],vals[1],vals[2],setting.getValColor().getAlpha() / 255.0f};
|
||||||
hsb.init();
|
hsb.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user