Skip to content

Commit

Permalink
Move color space button
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jul 10, 2023
1 parent c79205d commit bbf4685
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static OptionImpl<Options, ColorSpace> createColorSpaceButton(MinecraftOp
.setName(new TranslatableComponent("options.iris.colorSpace"))
.setTooltip(new TranslatableComponent("options.iris.colorSpace.sodium_tooltip"))
.setControl(option -> new CyclingControl<>(option, ColorSpace.class,
new Component[] { new TextComponent("SRGB"), new TextComponent("DCI_P3"), new TextComponent("Display P3"), new TextComponent("REC2020"), new TextComponent("Adobe RGB") }))
new Component[] { new TextComponent("sRGB"), new TextComponent("DCI_P3"), new TextComponent("Display P3"), new TextComponent("REC2020"), new TextComponent("Adobe RGB") }))
.setBinding((options, value) -> {
IrisVideoSettings.colorSpace = value;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@ public class MixinSodiumGameOptionPages {
Option<?> candidate) {
builder.add(candidate);
builder.add(IrisSodiumOptions.createMaxShadowDistanceSlider(vanillaOpts));

return builder;
}

@Redirect(method = "quality", remap = false,
slice = @Slice(
from = @At(value = "CONSTANT", args = "stringValue=options.graphics"),
to = @At(value = "CONSTANT", args = "stringValue=options.renderClouds")
),
at = @At(value = "INVOKE", remap = false,
target = "me/jellysquid/mods/sodium/client/gui/options/OptionGroup$Builder.add (" +
"Lme/jellysquid/mods/sodium/client/gui/options/Option;" +
")Lme/jellysquid/mods/sodium/client/gui/options/OptionGroup$Builder;"),
allow = 1)
private static OptionGroup.Builder iris$addColorSpaceOption(OptionGroup.Builder builder,
Option<?> candidate) {
builder.add(candidate);
builder.add(IrisSodiumOptions.createColorSpaceButton(vanillaOpts));

return builder;
Expand Down

0 comments on commit bbf4685

Please sign in to comment.