Removed NamedProperty
This commit is contained in:
@@ -2,7 +2,7 @@ package org.saturnclient.modules;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.NamedProperty;
|
import org.saturnclient.saturnclient.config.Property.NamedProperty;
|
||||||
import org.saturnclient.saturnclient.config.Property;
|
import org.saturnclient.saturnclient.config.Property;
|
||||||
|
|
||||||
public class ModDimensions {
|
public class ModDimensions {
|
||||||
@@ -20,17 +20,17 @@ public class ModDimensions {
|
|||||||
|
|
||||||
public NamedProperty<Map<String, Property<?>>> prop() {
|
public NamedProperty<Map<String, Property<?>>> prop() {
|
||||||
return Property.namespace(Map.of(
|
return Property.namespace(Map.of(
|
||||||
"X", x,
|
"X", x,
|
||||||
"Y", y,
|
"Y", y,
|
||||||
"Scale", scale,
|
"Scale", scale,
|
||||||
"Background Color", bgColor,
|
"Background Color", bgColor,
|
||||||
"Foreground Color", fgColor,
|
"Foreground Color", fgColor,
|
||||||
"Corner Radius", radius,
|
"Corner Radius", radius,
|
||||||
"Font", font
|
"Font", font)).named("In-Game Display");
|
||||||
)).named("In-Game Display");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModDimensions() {}
|
public ModDimensions() {
|
||||||
|
}
|
||||||
|
|
||||||
public ModDimensions(int width, int height) {
|
public ModDimensions(int width, int height) {
|
||||||
this.width = width;
|
this.width = width;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package org.saturnclient.modules;
|
package org.saturnclient.modules;
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.config.ConfigManager;
|
import org.saturnclient.saturnclient.config.ConfigManager;
|
||||||
import org.saturnclient.saturnclient.config.NamedProperty;
|
|
||||||
import org.saturnclient.ui2.resources.Textures;
|
import org.saturnclient.ui2.resources.Textures;
|
||||||
import org.saturnclient.ui2.RenderScope;
|
import org.saturnclient.ui2.RenderScope;
|
||||||
|
import org.saturnclient.saturnclient.config.Property.NamedProperty;
|
||||||
|
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
@@ -19,8 +19,11 @@ public abstract class Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void render(RenderScope scope) {}
|
public void render(RenderScope scope) {
|
||||||
public void tick() {}
|
}
|
||||||
|
|
||||||
|
public void tick() {
|
||||||
|
}
|
||||||
|
|
||||||
public abstract boolean isEnabled();
|
public abstract boolean isEnabled();
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
package org.saturnclient.saturnclient.config;
|
|
||||||
|
|
||||||
public class NamedProperty<T> {
|
|
||||||
public String name;
|
|
||||||
public Property<T> prop;
|
|
||||||
|
|
||||||
public NamedProperty(String name, Property<T> value) {
|
|
||||||
this.name = name;
|
|
||||||
this.prop = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,6 +10,15 @@ import com.google.gson.JsonObject;
|
|||||||
import com.google.gson.JsonPrimitive;
|
import com.google.gson.JsonPrimitive;
|
||||||
|
|
||||||
public class Property<T> {
|
public class Property<T> {
|
||||||
|
public static class NamedProperty<T> {
|
||||||
|
public String name;
|
||||||
|
public Property<T> prop;
|
||||||
|
|
||||||
|
public NamedProperty(String name, Property<T> value) {
|
||||||
|
this.name = name;
|
||||||
|
this.prop = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public enum PropertyType {
|
public enum PropertyType {
|
||||||
BOOLEAN,
|
BOOLEAN,
|
||||||
|
|||||||
Reference in New Issue
Block a user