Fixed Ui components

This commit is contained in:
2026-03-20 20:50:43 +01:00
parent 3a98c90620
commit 56b930c437
10 changed files with 31 additions and 27 deletions
@@ -2,13 +2,13 @@ package org.saturnclient.ui.components.inputs;
import java.awt.Color;
import org.saturnclient.config.property.Property;
import org.saturnclient.config.property.ColorProperty;
import org.saturnclient.ui.Element;
import org.saturnclient.ui.ElementContext;
import org.saturnclient.ui.RenderScope;
public class HexInput extends Element {
public Property<Integer> prop;
public class ColorInput extends Element {
public ColorProperty prop;
// Picker state
private boolean open = false;
@@ -26,7 +26,7 @@ public class HexInput extends Element {
private static final int SLIDER_HEIGHT = 10;
private static final int HUE_SLIDER_HEIGHT = 10;
public HexInput(Property<Integer> prop) {
public ColorInput(ColorProperty prop) {
this.prop = prop;
this.width = 58;
this.height = 20;
@@ -1,13 +1,13 @@
package org.saturnclient.ui.components.inputs;
import org.saturnclient.config.ConfigManager;
import org.saturnclient.config.property.Property;
import org.saturnclient.config.property.FloatProperty;
import org.saturnclient.ui.resources.Fonts;
public class FloatInput extends Input {
public Property<Float> prop;
public FloatProperty prop;
public FloatInput(Property<Float> prop) {
public FloatInput(FloatProperty prop) {
this.width = 120;
this.height = Fonts.getHeight();
this.prop = prop;
@@ -1,13 +1,13 @@
package org.saturnclient.ui.components.inputs;
import org.saturnclient.config.ConfigManager;
import org.saturnclient.config.property.Property;
import org.saturnclient.config.property.IntProperty;
import org.saturnclient.ui.resources.Fonts;
public class IntInput extends Input {
public Property<Integer> prop;
public IntProperty prop;
public IntInput(Property<Integer> prop) {
public IntInput(IntProperty prop) {
this.width = 120;
this.height = Fonts.getHeight();
this.prop = prop;
@@ -3,16 +3,16 @@ package org.saturnclient.ui.components.inputs;
import org.saturnclient.common.provider.GLFWProvider;
import org.saturnclient.common.provider.Providers;
import org.saturnclient.config.Theme;
import org.saturnclient.config.property.Property;
import org.saturnclient.config.property.KeybindingProperty;
import org.saturnclient.ui.Element;
import org.saturnclient.ui.ElementContext;
import org.saturnclient.ui.RenderScope;
import org.saturnclient.ui.resources.Fonts;
public class KeybindingSelector extends Element {
Property<Integer> prop;
KeybindingProperty prop;
public KeybindingSelector(Property<Integer> prop) {
public KeybindingSelector(KeybindingProperty prop) {
this.prop = prop;
this.width = 120;
this.height = Fonts.getHeight();
@@ -1,7 +1,7 @@
package org.saturnclient.ui.components.inputs;
import org.saturnclient.config.Theme;
import org.saturnclient.config.property.Property;
import org.saturnclient.config.property.SelectProperty;
import org.saturnclient.ui.Element;
import org.saturnclient.ui.ElementContext;
import org.saturnclient.ui.RenderScope;
@@ -9,9 +9,9 @@ import org.saturnclient.ui.Utils;
import org.saturnclient.ui.resources.Fonts;
public class Select extends Element {
private Property<Integer> prop;
private SelectProperty prop;
public Select(Property<Integer> prop) {
public Select(SelectProperty prop) {
this.prop = prop;
this.width = 150;
this.height = 15;
@@ -1,15 +1,15 @@
package org.saturnclient.ui.components.inputs;
import org.saturnclient.config.Theme;
import org.saturnclient.config.property.Property;
import org.saturnclient.config.property.BoolProperty;
import org.saturnclient.ui.Element;
import org.saturnclient.ui.ElementContext;
import org.saturnclient.ui.RenderScope;
public class Toggle extends Element {
private Property<Boolean> prop;
private BoolProperty prop;
public Toggle(Property<Boolean> prop) {
public Toggle(BoolProperty prop) {
this.prop = prop;
this.width = 60;
this.height = 30;