proper async events

This commit is contained in:
Matt Parker
2025-08-27 23:57:04 +10:00
parent 247989fda4
commit dd9825b629
2 changed files with 62 additions and 9 deletions

View File

@@ -1,15 +1,17 @@
namespace SharpIDE.Godot;
using SharpIDE.Application.Features.Events;
namespace SharpIDE.Godot;
public static class GodotGlobalEvents
{
public static event Func<BottomPanelType, Task> BottomPanelTabExternallySelected = _ => Task.CompletedTask;
public static void InvokeBottomPanelTabExternallySelected(BottomPanelType type) => BottomPanelTabExternallySelected.Invoke(type);
public static void InvokeBottomPanelTabExternallySelected(BottomPanelType type) => BottomPanelTabExternallySelected.InvokeParallelFireAndForget(type);
public static event Func<BottomPanelType?, Task> BottomPanelTabSelected = _ => Task.CompletedTask;
public static void InvokeBottomPanelTabSelected(BottomPanelType? type) => BottomPanelTabSelected.Invoke(type);
public static void InvokeBottomPanelTabSelected(BottomPanelType? type) => BottomPanelTabSelected.InvokeParallelFireAndForget(type);
public static event Func<bool, Task> BottomPanelVisibilityChangeRequested = _ => Task.CompletedTask;
public static void InvokeBottomPanelVisibilityChangeRequested(bool show) => BottomPanelVisibilityChangeRequested.Invoke(show);
public static void InvokeBottomPanelVisibilityChangeRequested(bool show) => BottomPanelVisibilityChangeRequested.InvokeParallelFireAndForget(show);
}
public enum BottomPanelType