From cf908fcfeb30c3e7d283a82e72a498b5a7554c35 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 29 Dec 2022 15:21:48 -0600 Subject: [PATCH] changed to change it in property UI --- Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs | 3 --- Source/Editor/Utilities/Utils.cs | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs b/Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs index 18bc1878d..b050e60c3 100644 --- a/Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs +++ b/Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs @@ -51,9 +51,6 @@ namespace FlaxEditor.CustomEditors.GUI /// The name. public PropertyNameLabel(string name) { - // Format name with capital first letter - name = name[0].ToString().ToUpper() + name.Substring(1); - Text = name; HorizontalAlignment = TextAlignment.Near; VerticalAlignment = TextAlignment.Center; diff --git a/Source/Editor/Utilities/Utils.cs b/Source/Editor/Utilities/Utils.cs index ea7f44efc..c89d824e7 100644 --- a/Source/Editor/Utilities/Utils.cs +++ b/Source/Editor/Utilities/Utils.cs @@ -912,6 +912,12 @@ namespace FlaxEditor.Utilities { var c = name[i]; + if (i == 0) + { + sb.Append(char.ToUpper(c)); + continue; + } + // Space before word starting with uppercase letter if (char.IsUpper(c) && i > 0) {