From 99951a1642cabbc8b0a7d4e91ea92594ec68e1db Mon Sep 17 00:00:00 2001 From: Speiger Date: Sun, 28 Apr 2024 19:31:39 +0200 Subject: [PATCH] Fixes? --- .../layout/{ => constraints}/ConstraintContainer.java | 4 ++-- .../newGui/layout/{ => constraints}/Constraints.java | 4 ++-- .../newGui/layout/{ => constraints}/IConstraint.java | 2 +- .../rendering/newGui/layout/layouts/ILayout.java | 11 +++++++++++ 4 files changed, 16 insertions(+), 5 deletions(-) rename src/main/java/speiger/src/coreengine/rendering/newGui/layout/{ => constraints}/ConstraintContainer.java (90%) rename src/main/java/speiger/src/coreengine/rendering/newGui/layout/{ => constraints}/Constraints.java (85%) rename src/main/java/speiger/src/coreengine/rendering/newGui/layout/{ => constraints}/IConstraint.java (95%) create mode 100644 src/main/java/speiger/src/coreengine/rendering/newGui/layout/layouts/ILayout.java diff --git a/src/main/java/speiger/src/coreengine/rendering/newGui/layout/ConstraintContainer.java b/src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/ConstraintContainer.java similarity index 90% rename from src/main/java/speiger/src/coreengine/rendering/newGui/layout/ConstraintContainer.java rename to src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/ConstraintContainer.java index e2445cd..29a86f1 100644 --- a/src/main/java/speiger/src/coreengine/rendering/newGui/layout/ConstraintContainer.java +++ b/src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/ConstraintContainer.java @@ -1,7 +1,7 @@ -package speiger.src.coreengine.rendering.newGui.layout; +package speiger.src.coreengine.rendering.newGui.layout.constraints; import speiger.src.coreengine.rendering.newGui.components.base.GuiComponent; -import speiger.src.coreengine.rendering.newGui.layout.IConstraint.Target; +import speiger.src.coreengine.rendering.newGui.layout.constraints.IConstraint.Target; public class ConstraintContainer { private static final int CONSTRAINT_LENGTH = 4; diff --git a/src/main/java/speiger/src/coreengine/rendering/newGui/layout/Constraints.java b/src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/Constraints.java similarity index 85% rename from src/main/java/speiger/src/coreengine/rendering/newGui/layout/Constraints.java rename to src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/Constraints.java index 2e795e0..4b5b36b 100644 --- a/src/main/java/speiger/src/coreengine/rendering/newGui/layout/Constraints.java +++ b/src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/Constraints.java @@ -1,7 +1,7 @@ -package speiger.src.coreengine.rendering.newGui.layout; +package speiger.src.coreengine.rendering.newGui.layout.constraints; import speiger.src.coreengine.rendering.gui.helper.box.IGuiBox; -import speiger.src.coreengine.rendering.newGui.layout.IConstraint.ISimpleConstraint; +import speiger.src.coreengine.rendering.newGui.layout.constraints.IConstraint.ISimpleConstraint; public class Constraints { public static record Pixels(float value, boolean inverted) implements ISimpleConstraint { diff --git a/src/main/java/speiger/src/coreengine/rendering/newGui/layout/IConstraint.java b/src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/IConstraint.java similarity index 95% rename from src/main/java/speiger/src/coreengine/rendering/newGui/layout/IConstraint.java rename to src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/IConstraint.java index c8a1cc7..9d10426 100644 --- a/src/main/java/speiger/src/coreengine/rendering/newGui/layout/IConstraint.java +++ b/src/main/java/speiger/src/coreengine/rendering/newGui/layout/constraints/IConstraint.java @@ -1,4 +1,4 @@ -package speiger.src.coreengine.rendering.newGui.layout; +package speiger.src.coreengine.rendering.newGui.layout.constraints; import speiger.src.coreengine.rendering.gui.helper.box.IGuiBox; import speiger.src.coreengine.rendering.newGui.components.base.GuiComponent; diff --git a/src/main/java/speiger/src/coreengine/rendering/newGui/layout/layouts/ILayout.java b/src/main/java/speiger/src/coreengine/rendering/newGui/layout/layouts/ILayout.java new file mode 100644 index 0000000..15b9668 --- /dev/null +++ b/src/main/java/speiger/src/coreengine/rendering/newGui/layout/layouts/ILayout.java @@ -0,0 +1,11 @@ +package speiger.src.coreengine.rendering.newGui.layout.layouts; + +import speiger.src.coreengine.rendering.newGui.components.base.GuiComponent; + +public interface ILayout { + public default ILayout add(GuiComponent comp) { return add(comp, null); } + public ILayout add(GuiComponent comp, Object value); + public ILayout remove(GuiComponent comp); + + public void apply(); +}