Skip to content

Commit

Permalink
non-breaking improvements to docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Dec 24, 2023
1 parent 3dbd741 commit f1cbfc3
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -22,13 +23,18 @@ public class DockerConfig extends ReflectiveConfig {
public final TrackedValue<Integer> leftHorizontalDividerLocation = this.value(300);
@SerializedName("right_horizontal_divider_location")
public final TrackedValue<Integer> 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<Boolean> 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<ValueMap<Docker.Location>> 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<SelectedDockers> 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<SelectedDockers> rightDockers = this.value(new SelectedDockers("", "", "structure"));

Expand Down Expand Up @@ -151,5 +157,14 @@ public ValueMap<String> getRepresentation() {
public ComplexConfigValue copy() {
return this;
}

@Override
public String toString() {
return "SelectedDockers[" +
"top='" + this.top + '\'' +
", bottom='" + this.bottom + '\'' +
", full='" + this.full + '\'' +
']';
}
}
}

0 comments on commit f1cbfc3

Please sign in to comment.