From f1cbfc355668341291168cf27127894be21908e2 Mon Sep 17 00:00:00 2001 From: ix0rai Date: Sun, 24 Dec 2023 13:40:09 -0600 Subject: [PATCH] non-breaking improvements to docker config --- .../quiltmc/enigma/gui/config/DockerConfig.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/DockerConfig.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/DockerConfig.java index 08a026c74..9e4c37fe3 100644 --- a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/DockerConfig.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/DockerConfig.java @@ -1,6 +1,7 @@ package org.quiltmc.enigma.gui.config; import org.quiltmc.config.api.ReflectiveConfig; +import org.quiltmc.config.api.annotations.Comment; import org.quiltmc.config.api.annotations.SerializedName; import org.quiltmc.config.api.values.ComplexConfigValue; import org.quiltmc.config.api.values.ConfigSerializableObject; @@ -22,13 +23,18 @@ public class DockerConfig extends ReflectiveConfig { public final TrackedValue leftHorizontalDividerLocation = this.value(300); @SerializedName("right_horizontal_divider_location") public final TrackedValue rightHorizontalDividerLocation = this.value(700); + @Comment("A bodge to properly offset the right divider location depending on UI state.") @SerializedName("saved_with_left_docker_open") public final TrackedValue savedWithLeftDockerOpen = this.value(true); + @Comment("The location of each docker's button in the button sidebars.") + @Comment("Encoded with the side (RIGHT or LEFT) followed by a semicolon (;) and the vertical location (TOP or BOTTOM).") @SerializedName("button_locations") public final TrackedValue> buttonLocations = this.map(new Docker.Location(Docker.Side.LEFT, Docker.VerticalLocation.TOP)).build(); + @Comment("The currently active dockers on the left side of the UI.") @SerializedName("left_dockers") public final TrackedValue leftDockers = this.value(new SelectedDockers("", "", "all_classes")); + @Comment("The currently active dockers on the right side of the UI.") @SerializedName("right_dockers") public final TrackedValue rightDockers = this.value(new SelectedDockers("", "", "structure")); @@ -151,5 +157,14 @@ public ValueMap getRepresentation() { public ComplexConfigValue copy() { return this; } + + @Override + public String toString() { + return "SelectedDockers[" + + "top='" + this.top + '\'' + + ", bottom='" + this.bottom + '\'' + + ", full='" + this.full + '\'' + + ']'; + } } }