Update line numbers on panel resize

This commit is contained in:
Sinai 2021-06-21 19:50:11 +10:00
parent 7a400e762c
commit 94ec1c4908
2 changed files with 7 additions and 0 deletions

View File

@ -80,6 +80,7 @@ namespace UnityExplorer.UI.CSConsole
Panel.OnAutoIndentToggled += OnToggleAutoIndent;
Panel.OnCtrlRToggled += OnToggleCtrlRShortcut;
Panel.OnSuggestionsToggled += OnToggleSuggestions;
Panel.OnPanelResized += OnInputScrolled;
// Run startup script
try

View File

@ -35,6 +35,7 @@ namespace UnityExplorer.UI.Panels
public Action<bool> OnCtrlRToggled;
public Action<bool> OnSuggestionsToggled;
public Action<bool> OnAutoIndentToggled;
public Action OnPanelResized;
private void InvokeOnValueChanged(string value)
{
@ -62,6 +63,11 @@ namespace UnityExplorer.UI.Panels
// UI Construction
public override void OnFinishResize(RectTransform panel)
{
OnPanelResized?.Invoke();
}
protected internal override void DoSetDefaultPosAndAnchors()
{
Rect.localPosition = Vector2.zero;