use of mathax.client.utils.render.color.SettingColor in project Client by MatHax.
the class SBlockDataScreen method initWidgets.
@Override
public void initWidgets() {
Settings settings = new Settings();
SettingGroup sgGeneral = settings.getDefaultGroup();
SettingGroup sgTracer = settings.createGroup("Tracer");
sgGeneral.add(new EnumSetting.Builder<ShapeMode>().name("shape-mode").description("How the shape is rendered.").defaultValue(ShapeMode.Lines).onModuleActivated(shapeModeSetting -> shapeModeSetting.set(blockData.shapeMode)).onChanged(shapeMode -> {
blockData.shapeMode = shapeMode;
changed(blockData, block, setting);
}).build());
sgGeneral.add(new ColorSetting.Builder().name("line-color").description("Color of lines.").defaultValue(new SettingColor(MatHax.INSTANCE.MATHAX_COLOR.r, MatHax.INSTANCE.MATHAX_COLOR.g, MatHax.INSTANCE.MATHAX_COLOR.b)).onModuleActivated(settingColorSetting -> settingColorSetting.set(blockData.lineColor)).onChanged(settingColor -> {
blockData.lineColor.set(settingColor);
changed(blockData, block, setting);
}).build());
sgGeneral.add(new ColorSetting.Builder().name("side-color").description("Color of sides.").defaultValue(new SettingColor(MatHax.INSTANCE.MATHAX_COLOR.r, MatHax.INSTANCE.MATHAX_COLOR.g, MatHax.INSTANCE.MATHAX_COLOR.b, 75)).onModuleActivated(settingColorSetting -> settingColorSetting.set(blockData.sideColor)).onChanged(settingColor -> {
blockData.sideColor.set(settingColor);
changed(blockData, block, setting);
}).build());
sgTracer.add(new BoolSetting.Builder().name("tracer").description("If tracer line is allowed to this block.").defaultValue(true).onModuleActivated(booleanSetting -> booleanSetting.set(blockData.tracer)).onChanged(aBoolean -> {
blockData.tracer = aBoolean;
changed(blockData, block, setting);
}).build());
sgTracer.add(new ColorSetting.Builder().name("tracer-color").description("Color of tracer line.").defaultValue(new SettingColor(MatHax.INSTANCE.MATHAX_COLOR.r, MatHax.INSTANCE.MATHAX_COLOR.g, MatHax.INSTANCE.MATHAX_COLOR.b)).onModuleActivated(settingColorSetting -> settingColorSetting.set(blockData.tracerColor)).onChanged(settingColor -> {
blockData.tracerColor = settingColor;
changed(blockData, block, setting);
}).build());
settings.onActivated();
add(theme.settings(settings)).expandX();
}
Aggregations