Merge branch 'scroll-script-add' of https://github.com/Tryibion/FlaxEngine into Tryibion-scroll-script-add
This commit is contained in:
@@ -424,6 +424,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
{
|
||||
presenter.Undo.AddAction(multiAction);
|
||||
presenter.Control.Focus();
|
||||
|
||||
// Scroll to bottom of script control where a new script is added.
|
||||
if (presenter.Panel.Parent is Panel p && Editor.Instance.Options.Options.Interface.ScrollToScriptOnAdd)
|
||||
{
|
||||
var loc = ScriptsEditor.Layout.Control.BottomLeft;
|
||||
p.ScrollViewTo(loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,6 +258,13 @@ namespace FlaxEditor.Options
|
||||
|
||||
private TextAlignment _tooltipTextAlignment = TextAlignment.Center;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to scroll to the script when a script is added to an actor.
|
||||
/// </summary>
|
||||
[DefaultValue(true)]
|
||||
[EditorDisplay("Interface"), EditorOrder(322)]
|
||||
public bool ScrollToScriptOnAdd { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamps prefix mode for output log messages.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user