(fix) color pickers now start where you left off

This commit is contained in:
refactoring 2024-01-05 12:11:56 -05:00
parent d2bba6f5f1
commit c844a80e5f

View File

@ -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();
} }