using Sandbox.Menu; namespace Sandbox.Internal; /// /// This is how the engine communicates with the menu system /// public interface IMenuSystem { internal static IMenuSystem Current { get; set; } /// /// Called to initialize the menu system /// public void Init(); /// /// Close down the menu, delete everything /// public void Shutdown(); /// /// Called every frame, to let the menu think /// public void Tick(); /// /// Show a popup /// public void Popup( string type, string title, string subtitle ); /// /// Show a question /// public void Question( string message, string icon, Action yes, Action no ); /// /// Package closed. Add a toast asking if it was cool or not /// public void OnPackageClosed( Package package ); internal static void ShowServerError( string title, string subtitle ) { Current?.Popup( "error", title, subtitle ); } /// /// True if we want to force the cursor to be visible and swallow input. /// This is used for the developer console and loading screens. /// public bool ForceCursorVisible { get; } } /// /// Used to talk to the menu's loading screen. /// internal interface ILoadingInterface : IDisposable { public void LoadingProgress( LoadingProgress progress ); }