Files
sbox-public/engine/Sandbox.Engine/Core/Internal/IMenuSystem.cs
Sol Williams fefb34b778 Better disconnect feedback, flow tweaks (#4516)
https://files.facepunch.com/solw/2026/April/16_16-00-DapperAmethystgemclam.png

* Display disconnect, kick, or connection failed messages to users in a big new messagebox.
* Client reconnect (from map change etc) uses normal, interruptable connect flow.
* Connecting by SteamId attempts with retries (incl. for lobbies for now)
* Connecting by IP swaps localhost for loopback address, appends default port if not supplied.
* More explicit loading screen activation for connection progress, no longer reactivates from a text update.
* Fix main menu being briefly reloaded when loading games or on reconnect.
2026-04-16 16:03:17 +01:00

56 lines
1.3 KiB
C#

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