changed to change it in property UI

This commit is contained in:
Chandler Cox
2022-12-29 15:21:48 -06:00
parent f52e76fe30
commit cf908fcfeb
2 changed files with 6 additions and 3 deletions

View File

@@ -51,9 +51,6 @@ namespace FlaxEditor.CustomEditors.GUI
/// <param name="name">The name.</param> /// <param name="name">The name.</param>
public PropertyNameLabel(string name) public PropertyNameLabel(string name)
{ {
// Format name with capital first letter
name = name[0].ToString().ToUpper() + name.Substring(1);
Text = name; Text = name;
HorizontalAlignment = TextAlignment.Near; HorizontalAlignment = TextAlignment.Near;
VerticalAlignment = TextAlignment.Center; VerticalAlignment = TextAlignment.Center;

View File

@@ -912,6 +912,12 @@ namespace FlaxEditor.Utilities
{ {
var c = name[i]; var c = name[i];
if (i == 0)
{
sb.Append(char.ToUpper(c));
continue;
}
// Space before word starting with uppercase letter // Space before word starting with uppercase letter
if (char.IsUpper(c) && i > 0) if (char.IsUpper(c) && i > 0)
{ {