From a98458be1fe3e0d91fa62d785699876bb82b91b0 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 31 Aug 2023 14:14:01 -0500 Subject: [PATCH] Small improvements. --- Source/Engine/UI/GUI/Common/ProgressBar.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Engine/UI/GUI/Common/ProgressBar.cs b/Source/Engine/UI/GUI/Common/ProgressBar.cs index ebeed1fa1..760f031a7 100644 --- a/Source/Engine/UI/GUI/Common/ProgressBar.cs +++ b/Source/Engine/UI/GUI/Common/ProgressBar.cs @@ -27,9 +27,9 @@ namespace FlaxEngine.GUI } /// - /// The direction to move the progress bar + /// The origin to move the progress bar to. /// - public enum BarDirection + public enum BarOrigin { /// /// Move the bar horizontally to the left. @@ -90,10 +90,10 @@ namespace FlaxEngine.GUI public BarMethod Method = BarMethod.Stretch; /// - /// The direction to clip or stretch the bar. + /// The origin or where the bar decreases to. /// - [EditorOrder(42), Tooltip("The direction to clip or stretch the bar.")] - public BarDirection Direction = BarDirection.HorizontalLeft; + [EditorOrder(42), Tooltip("The origin or where the bar decreases to.")] + public BarOrigin Origin = BarOrigin.HorizontalLeft; /// /// Gets or sets the minimum value. @@ -223,17 +223,17 @@ namespace FlaxEngine.GUI if (progressNormalized > 0.001f) { Rectangle barRect = new Rectangle(0, 0, Width * progressNormalized, Height); - switch (Direction) + switch (Origin) { - case BarDirection.HorizontalLeft: + case BarOrigin.HorizontalLeft: break; - case BarDirection.HorizontalRight: + case BarOrigin.HorizontalRight: barRect = new Rectangle(Width - Width * progressNormalized, 0, Width * progressNormalized, Height); break; - case BarDirection.VerticalTop: + case BarOrigin.VerticalTop: barRect = new Rectangle(0, 0, Width, Height * progressNormalized); break; - case BarDirection.VerticalBottom: + case BarOrigin.VerticalBottom: barRect = new Rectangle(0, Height - Height * progressNormalized, Width, Height * progressNormalized); break; default: break;