Merge remote-tracking branch 'origin/master' into 1.6

This commit is contained in:
Wojtek Figat
2023-04-04 18:08:25 +02:00
5 changed files with 68 additions and 51 deletions

View File

@@ -3,6 +3,7 @@
using FlaxEditor.CustomEditors.Elements;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Json;
namespace FlaxEditor.CustomEditors.Editors
{
@@ -54,6 +55,13 @@ namespace FlaxEditor.CustomEditors.Editors
ZElement = grid.FloatValue();
ZElement.ValueBox.ValueChanged += OnValueChanged;
ZElement.ValueBox.SlidingEnd += ClearToken;
LinkedLabel.SetupContextMenu += (label, menu, editor) =>
{
menu.AddSeparator();
var value = ((Quaternion)Values[0]).EulerAngles;
menu.AddButton("Copy Euler", () => { Clipboard.Text = JsonSerializer.Serialize(value); }).TooltipText = "Copy the Euler Angles in Degrees";
};
}
private void OnValueChanged()