added theming
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
package org.saturnclient.saturnclient.config;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.gson.GsonBuilder;
|
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.google.gson.JsonParser;
|
|
||||||
import com.google.gson.JsonPrimitive;
|
|
||||||
|
|
||||||
import net.minecraft.client.MinecraftClient;
|
|
||||||
|
|
||||||
public class Theme {
|
|
||||||
private Map<String, Property<?>> currentMap;
|
|
||||||
|
|
||||||
public void setProperty(String name, Property<?> value) {
|
|
||||||
currentMap.put(name, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Property<?> getProperty(String name) {
|
|
||||||
return currentMap.get(name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,7 +12,6 @@ import net.minecraft.text.Text;
|
|||||||
|
|
||||||
public class SaturnScreen extends Screen {
|
public class SaturnScreen extends Screen {
|
||||||
protected List<Element> elements = new ArrayList<>();
|
protected List<Element> elements = new ArrayList<>();
|
||||||
private int hoveringIndex;
|
|
||||||
|
|
||||||
public SaturnScreen(String title) {
|
public SaturnScreen(String title) {
|
||||||
super(Text.literal(title));
|
super(Text.literal(title));
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.saturnclient.ui2.resources.Fonts;
|
|||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
public class Button extends Element {
|
public class Button extends Element {
|
||||||
private static ThemeManager theme = new ThemeManager("Button", "testing");
|
private static ThemeManager theme = new ThemeManager("Button", "hovering");
|
||||||
private static Property<Integer> bgColor = theme.property("bg-color", new Property<Integer>(0xFF000000));
|
private static Property<Integer> bgColor = theme.property("bg-color", new Property<Integer>(0xFF000000));
|
||||||
private static Property<Integer> fgColor = theme.property("fg-color", new Property<Integer>(0xFFFFFFFF));
|
private static Property<Integer> fgColor = theme.property("fg-color", new Property<Integer>(0xFFFFFFFF));
|
||||||
private static Property<Boolean> bold = theme.property("fg-bold", new Property<Boolean>(false));
|
private static Property<Boolean> bold = theme.property("fg-bold", new Property<Boolean>(false));
|
||||||
|
|||||||
Reference in New Issue
Block a user