Merge remote-tracking branch 'origin/master' into 1.9
# Conflicts: # Source/Editor/Modules/ContentDatabaseModule.cs # Source/Editor/Surface/SurfaceUtils.cs # Source/Editor/Windows/Assets/MaterialInstanceWindow.cs # Source/Engine/Foliage/Foliage.cpp # Source/Engine/Graphics/Models/MeshBase.h # Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Textures.cpp
This commit is contained in:
@@ -337,14 +337,12 @@ namespace FlaxEditor.GUI.ContextMenu
|
||||
/// <summary>
|
||||
/// Adds the separator.
|
||||
/// </summary>
|
||||
/// <returns>Created context menu item control.</returns>
|
||||
public ContextMenuSeparator AddSeparator()
|
||||
public void AddSeparator()
|
||||
{
|
||||
var item = new ContextMenuSeparator(this)
|
||||
{
|
||||
Parent = _panel
|
||||
};
|
||||
return item;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using FlaxEditor.CustomEditors;
|
||||
using FlaxEditor.CustomEditors.Elements;
|
||||
using FlaxEditor.GUI.ContextMenu;
|
||||
using FlaxEditor.Scripting;
|
||||
using FlaxEngine;
|
||||
|
||||
@@ -277,6 +278,14 @@ namespace FlaxEditor.GUI
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnLayoutMenuButton(ContextMenuButton button, int index, bool construct = false)
|
||||
{
|
||||
base.OnLayoutMenuButton(button, index, construct);
|
||||
if (IsFlags)
|
||||
button.CloseMenuOnClick = false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnItemClicked(int index)
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace FlaxEditor.GUI.Input
|
||||
var style = Style.Current;
|
||||
|
||||
// Draw sliding UI
|
||||
Render2D.DrawSprite(style.Scalar, SlideRect, style.Foreground);
|
||||
Render2D.DrawSprite(style.Scalar, SlideRect, EnabledInHierarchy ? style.Foreground : style.ForegroundDisabled);
|
||||
|
||||
// Check if is sliding
|
||||
if (_isSliding)
|
||||
|
||||
@@ -130,9 +130,9 @@ namespace FlaxEditor.GUI.Timeline
|
||||
public override void OnPlay()
|
||||
{
|
||||
var time = CurrentTime;
|
||||
_preview.Play();
|
||||
if (_preview != null)
|
||||
{
|
||||
_preview.Play();
|
||||
Editor.Internal_SetAnimationTime(Object.GetUnmanagedPtr(_preview.PreviewActor), time);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace FlaxEditor.GUI.Timeline.Undo
|
||||
|
||||
private void Set(byte[] data)
|
||||
{
|
||||
if (_timeline == null)
|
||||
return;
|
||||
var track = _timeline.FindTrack(_name);
|
||||
using (var memory = new MemoryStream(data))
|
||||
using (var stream = new BinaryReader(memory))
|
||||
@@ -42,11 +44,8 @@ namespace FlaxEditor.GUI.Timeline.Undo
|
||||
track.Flags = (TrackFlags)stream.ReadByte();
|
||||
track.Archetype.Load(Timeline.FormatVersion, track, stream);
|
||||
}
|
||||
if (_timeline != null)
|
||||
{
|
||||
_timeline.ArrangeTracks();
|
||||
_timeline.MarkAsEdited();
|
||||
}
|
||||
_timeline.ArrangeTracks();
|
||||
_timeline.MarkAsEdited();
|
||||
track.OnUndo();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user