From 425699c4b03da8ee558333b7d45fe065aaa5db32 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Sun, 19 Jan 2025 13:51:50 -0600 Subject: [PATCH] Clamp control anchors betwen 0 and 1. --- Source/Engine/UI/GUI/Control.Bounds.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Engine/UI/GUI/Control.Bounds.cs b/Source/Engine/UI/GUI/Control.Bounds.cs index ff548c669..6054250f8 100644 --- a/Source/Engine/UI/GUI/Control.Bounds.cs +++ b/Source/Engine/UI/GUI/Control.Bounds.cs @@ -50,7 +50,7 @@ namespace FlaxEngine.GUI /// /// Gets or sets the normalized position in the parent control that the upper left corner is anchored to (range 0-1). /// - [Serialize, HideInEditor] + [Serialize, HideInEditor, Limit(0, 1, 0.01f)] public Float2 AnchorMin { get => _anchorMin; @@ -69,7 +69,7 @@ namespace FlaxEngine.GUI /// /// Gets or sets the normalized position in the parent control that the bottom right corner is anchored to (range 0-1). /// - [Serialize, HideInEditor] + [Serialize, HideInEditor, Limit(0, 1, 0.01f)] public Float2 AnchorMax { get => _anchorMax;