use instance for global events
This commit is contained in:
@@ -25,7 +25,7 @@ public partial class CodeEditorPanel : MarginContainer
|
||||
var tabBar = _tabContainer.GetTabBar();
|
||||
tabBar.TabCloseDisplayPolicy = TabBar.CloseButtonDisplayPolicy.ShowAlways;
|
||||
tabBar.TabClosePressed += OnTabClosePressed;
|
||||
GlobalEvents.DebuggerExecutionStopped += OnDebuggerExecutionStopped;
|
||||
GlobalEvents.Instance.DebuggerExecutionStopped += OnDebuggerExecutionStopped;
|
||||
}
|
||||
|
||||
public override void _UnhandledKeyInput(InputEvent @event)
|
||||
|
||||
@@ -22,11 +22,11 @@ public partial class DebugPanel : Control
|
||||
//_tabBar.TabClosePressed
|
||||
_tabBar.TabClicked += OnTabBarTabClicked;
|
||||
_tabsPanel = GetNode<MarginContainer>("%TabsPanel");
|
||||
GlobalEvents.ProjectStartedDebugging += async projectModel =>
|
||||
GlobalEvents.Instance.ProjectStartedDebugging += async projectModel =>
|
||||
{
|
||||
await this.InvokeAsync(() => ProjectStartedDebugging(projectModel));
|
||||
};
|
||||
GlobalEvents.ProjectStoppedDebugging += async projectModel =>
|
||||
GlobalEvents.Instance.ProjectStoppedDebugging += async projectModel =>
|
||||
{
|
||||
await this.InvokeAsync(() => ProjectStoppedDebugging(projectModel));
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ public partial class ThreadsVariablesSubTab : Control
|
||||
_threadsVboxContainer = GetNode<VBoxContainer>("%ThreadsPanel/VBoxContainer");
|
||||
_stackFramesVboxContainer = GetNode<VBoxContainer>("%StackFramesPanel/VBoxContainer");
|
||||
_variablesVboxContainer = GetNode<VBoxContainer>("%VariablesPanel/VBoxContainer");
|
||||
GlobalEvents.DebuggerExecutionStopped += OnDebuggerExecutionStopped;
|
||||
GlobalEvents.Instance.DebuggerExecutionStopped += OnDebuggerExecutionStopped;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ public partial class RunPanel : Control
|
||||
//_tabBar.TabClosePressed
|
||||
_tabBar.TabClicked += OnTabBarTabClicked;
|
||||
_tabsPanel = GetNode<MarginContainer>("%TabsPanel");
|
||||
GlobalEvents.ProjectStartedRunning += async projectModel =>
|
||||
GlobalEvents.Instance.ProjectStartedRunning += async projectModel =>
|
||||
{
|
||||
await this.InvokeAsync(() => ProjectStartedRunning(projectModel));
|
||||
};
|
||||
GlobalEvents.ProjectStoppedRunning += async projectModel =>
|
||||
GlobalEvents.Instance.ProjectStoppedRunning += async projectModel =>
|
||||
{
|
||||
await this.InvokeAsync(() => ProjectStoppedRunning(projectModel));
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@ using Godot;
|
||||
using Microsoft.Build.Locator;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using SharpIDE.Application.Features.Analysis;
|
||||
using SharpIDE.Application.Features.Events;
|
||||
using SharpIDE.Application.Features.SolutionDiscovery;
|
||||
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
|
||||
using SharpIDE.Godot.Features.BottomPanel;
|
||||
@@ -34,6 +35,7 @@ public partial class IdeRoot : Control
|
||||
public override void _EnterTree()
|
||||
{
|
||||
GodotGlobalEvents.Instance = new GodotGlobalEvents();
|
||||
GlobalEvents.Instance = new GlobalEvents();
|
||||
}
|
||||
|
||||
public override void _Ready()
|
||||
|
||||
Reference in New Issue
Block a user