public class Sandbox.Game.Overlay
Provides static methods for displaying various modal overlays in the game UI. The `Sandbox.Game.Overlay` class allows you to open modals for packages, maps, news, organizations, reviews, friends lists, server lists, settings, input bindings, and player profiles. It serves as a central point for invoking user interface overlays that interact with core game and community features.
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
public Overlay()
No results match this filter.
Methods
Showing 20 methods
public static void Close()
Closes the top overlay if one exists
public static void CloseAll(bool immediate = False)
Close all open overlays
Parameters
immediate: If , will skip any outros Default: False
public static void CreateGame(Sandbox.Modals.CreateGameOptions options)
Opens a modal to create a game with a bunch of settings. We use this in the menu when you click "Create Game" and the game has options.
public static void ShowBinds()
Opens a modal that lets you view and rebind game input actions.
public static void ShowGameModal(string packageIdent)
Opens a modal for the specified game package
public static void ShowMapModal(string packageIdent)
Opens a modal for the specified map package
public static void ShowNewsModal(Sandbox.Services.News newsitem)
Opens a modal for the news item
public static void ShowOrganizationModal(Sandbox.Package.Organization org)
Opens a modal for the specified organization. This is most likely called from a Package - so get the organization from there.
public static void ShowPackageSelector(string query, System.Action`1<Sandbox.Package> onSelect, System.Action`1<string> onFilterChanged = null)
Parameters
onFilterChanged: Default: null
public static void ShowPauseMenu()
Opens the pause menu overlay. This is the same menu that appears when pressing ESC.
public static void ShowPlayer(Sandbox.SteamId steamid, string page)
View a selected user's profile
public static void ShowPlayerList()
Open a modal that shows a list of players currently in the game
public static void ShowReviewModal(Sandbox.Package package)
Opens a modal to review the specified package
public static void ShowServerList(Sandbox.Modals.ServerListConfig config)
Opens a modal that shows a list of active servers
public static void ShowSettingsModal(string page)
Opens a modal that lets you modify your settings Optionally, you can specify a page to open directly to: "keybinds", "video", "input", "audio", "game", "storage", "developer"
public static void WorkshopPublish(Sandbox.Modals.WorkshopPublishOptions options)
Open a modal that prompts the user to publish content to the workshop
No results match this filter.
Properties
Showing 2 properties
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | global |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Game.Overlay |