Code cleanup, add tooltip and cache property option in layout #1140

This commit is contained in:
Wojtek Figat
2023-06-09 17:32:57 +02:00
parent 94abdfd734
commit 3bbfe9de8a
4 changed files with 25 additions and 27 deletions

View File

@@ -31,9 +31,9 @@ namespace FlaxEditor.Windows
public bool ScaleLinked = false;
/// <summary>
/// Indictation of if UI elements should size relative to the pivot point
/// Indication of if UI elements should size relative to the pivot point.
/// </summary>
public bool PivotRelativeSize = true;
public bool UIPivotRelative = true;
/// <summary>
/// Initializes a new instance of the <see cref="PropertiesWindow"/> class.
@@ -71,13 +71,16 @@ namespace FlaxEditor.Windows
public override void OnLayoutSerialize(XmlWriter writer)
{
writer.WriteAttributeString("ScaleLinked", ScaleLinked.ToString());
writer.WriteAttributeString("UIPivotRelative", UIPivotRelative.ToString());
}
/// <inheritdoc />
public override void OnLayoutDeserialize(XmlElement node)
{
if (bool.TryParse(node.GetAttribute("ScaleLinked"), out bool value1))
ScaleLinked = value1;
if (bool.TryParse(node.GetAttribute("UIPivotRelative"), out value1))
UIPivotRelative = value1;
}
}
}