Fixed FeatureLayout

This commit is contained in:
2026-03-20 20:56:37 +01:00
parent 44d590d6ed
commit c185cea305
2 changed files with 16 additions and 12 deletions
@@ -2,7 +2,7 @@ package org.saturnclient.feature;
import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.config.ConfigManager;
import org.saturnclient.config.property.Property.NamedProperty;
import org.saturnclient.config.property.NamedProperty;
import org.saturnclient.ui.RenderScope;
import org.saturnclient.ui.resources.Textures;
@@ -10,10 +10,10 @@ public abstract class Feature {
private final FeatureDetails details;
private final ConfigManager configManager;
public Feature(FeatureDetails details, NamedProperty<?>... props) {
public Feature(FeatureDetails details, NamedProperty... props) {
this.details = details;
configManager = new ConfigManager(details.name);
for (NamedProperty<?> prop : props) {
for (NamedProperty prop : props) {
configManager.property(prop.name, prop.prop);
}
}
@@ -3,22 +3,26 @@ package org.saturnclient.feature;
import java.util.Map;
import org.saturnclient.config.property.Property;
import org.saturnclient.config.property.Property.NamedProperty;
import org.saturnclient.config.property.SelectProperty;
import org.saturnclient.config.property.ColorProperty;
import org.saturnclient.config.property.FloatProperty;
import org.saturnclient.config.property.IntProperty;
import org.saturnclient.config.property.NamedProperty;
public class FeatureLayout {
public Property<Integer> x = Property.integer(0);
public Property<Integer> y = Property.integer(0);
public Property<Float> scale = Property.floatProp(1.0f);
public Property<Integer> bgColor = Property.color(0x00000000);
public Property<Integer> fgColor = Property.color(0xFFffffff);
public Property<Integer> radius = Property.integer(0);
public Property<Integer> font = Property.font(0);
public IntProperty x = Property.integer(0);
public IntProperty y = Property.integer(0);
public FloatProperty scale = Property.floatProp(1.0f);
public ColorProperty bgColor = Property.color(0x00000000);
public ColorProperty fgColor = Property.color(0xFFffffff);
public IntProperty radius = Property.integer(0);
public SelectProperty font = Property.font(0);
public boolean renderBackground = true;
public int width = 0;
public int height = 0;
public NamedProperty<Map<String, Property<?>>> prop() {
public NamedProperty prop() {
return Property.namespace(Map.of(
"X", x,
"Y", y,