-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainMenuAPI.cs
More file actions
16 lines (14 loc) · 770 Bytes
/
Copy pathMainMenuAPI.cs
File metadata and controls
16 lines (14 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
namespace BigMenuLib;
/// <summary>
/// The API used for creating UI in a general context.
/// </summary>
/// <remarks>All <c>MainMenuAPI.Create...()</c> methods should be called from inside an event (e.g. <see cref="Loaded"/>). An exception will be thrown otherwise.</remarks>
public static class MainMenuAPI
{
/// <summary>
/// Fires whenever the MainMenuManager is loaded. An instance of the <see cref="MainMenuManager"/> is provided for convenience.
/// </summary>
/// <remarks>This event won't fire when the Main Menu is opened or switched to, only initialized</remarks>
public static event Action<MainMenuManager> Loaded;
internal static void InvokeMainMenuLoaded(MainMenuManager mainMenuManager) => Loaded?.Invoke(mainMenuManager);
}