From d2ab30e7a69bfe7efda63ae75812207377917bd3 Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Sun, 30 Mar 2025 18:50:27 +0000
Subject: [PATCH] Merge branch 'Flexalon-UI-Layouts' into develop
---
Assets/Flexalon/Runtime/Core/FlexalonLayout.cs | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/Assets/Flexalon/Runtime/Core/FlexalonLayout.cs b/Assets/Flexalon/Runtime/Core/FlexalonLayout.cs
new file mode 100644
index 0000000..83b976b
--- /dev/null
+++ b/Assets/Flexalon/Runtime/Core/FlexalonLayout.cs
@@ -0,0 +1,21 @@
+using UnityEngine;
+
+namespace Flexalon
+{
+ /// <summary> A layout determines how the children of a node are positioned. </summary>
+ public interface Layout
+ {
+ /// <summary> Perform minimal work to determine what the size of node and available size for node's children. </summary>
+ Bounds Measure(FlexalonNode node, Vector3 size, Vector3 min, Vector3 max);
+
+ /// <summary> Position the children of node within the available bounds. </summary>
+ void Arrange(FlexalonNode node, Vector3 layoutSize);
+ }
+
+ /// <summary> A constraint runs whenever a target layout is updated. </summary>
+ public interface Constraint
+ {
+ GameObject Target { get; }
+ void Constrain(FlexalonNode node);
+ }
+}
\ No newline at end of file
--
Gitblit v1.10.0