Fix properties editor labels positioning

#2530 #2609
This commit is contained in:
Wojtek Figat
2024-08-30 12:58:12 +02:00
parent e925af534e
commit 68eb8b9f21
8 changed files with 68 additions and 26 deletions

View File

@@ -33,10 +33,10 @@ namespace FlaxEditor.CustomEditors.Editors
if (layout.Children.Count == 0)
return;
var propList = layout.Children[layout.Children.Count - 1] as PropertiesListElement;
if (propList == null || propList.Children.Count != 2)
if (propList == null || propList.Children.Count < 2)
return;
var idElement = propList.Children[0] as TextBoxElement;
var valueElement = propList.Children[1] as TextBoxElement;
var idElement = propList.Children[propList.Children.Count - 2] as TextBoxElement;
var valueElement = propList.Children[propList.Children.Count - 1] as TextBoxElement;
if (idElement == null || valueElement == null)
return;
_idElement = idElement;