Overlayclass
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.
Constructors1
Showing 1 constructors
public Overlay()
No results match this filter.
Methods23
Showing 23 methods
public static void Close()
Closes the top overlay if one exists
void—public static void CloseAll(bool immediate = False)
Close all open overlays
| Parameter | Type | Description |
|---|---|---|
| immediate = False | bool | If , will skip any outros |
void—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.
| Parameter | Type | Description |
|---|---|---|
| options | CreateGameOptions | — |
void—public static void ShowBinds()
Opens a modal that lets you view and rebind game input actions.
void—public static void ShowGameModal(string packageIdent)
Opens a modal for the specified game package
| Parameter | Type | Description |
|---|---|---|
| packageIdent | string | — |
void—public static void ShowMapModal(string packageIdent)
Opens a modal for the specified map package
| Parameter | Type | Description |
|---|---|---|
| packageIdent | string | — |
void—public static void ShowMapSelector(System.Action`1<string> onSelect, string selected = null)
| Parameter | Type | Description |
|---|---|---|
| onSelect | Action<string> | — |
| selected = null | string | — |
void—public static void ShowNewsModal(Sandbox.Services.News newsitem)
Opens a modal for the news item
| Parameter | Type | Description |
|---|---|---|
| newsitem | News | — |
void—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.
| Parameter | Type | Description |
|---|---|---|
| org | Organization | — |
void—public static void ShowPackageSelector(string query, System.Action`1<Sandbox.Package> onSelect, System.Action`1<string> onFilterChanged = null)
| Parameter | Type | Description |
|---|---|---|
| query | string | — |
| onSelect | Action<Package> | — |
| onFilterChanged = null | Action<string> | — |
void—public static void ShowPauseMenu()
Opens the pause menu overlay. This is the same menu that appears when pressing ESC.
void—public static void ShowPlayer(Sandbox.SteamId steamid, string page)
View a selected user's profile
| Parameter | Type | Description |
|---|---|---|
| steamid | SteamId | — |
| page | string | — |
void—public static void ShowPlayerList()
Open a modal that shows a list of players currently in the game
void—public static void ShowReportModal(string packageIdent)
Opens a modal to report the specified package
| Parameter | Type | Description |
|---|---|---|
| packageIdent | string | — |
void—public static void ShowReviewModal(Sandbox.Package package)
Opens a modal to review the specified package
| Parameter | Type | Description |
|---|---|---|
| package | Package | — |
void—public static void ShowServerList(Sandbox.Modals.ServerListConfig config)
Opens a modal that shows a list of active servers
| Parameter | Type | Description |
|---|---|---|
| config | ServerListConfig | — |
void—public static void ShowServiceConnector()
Shows modal to edit the streaming settings
void—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"
| Parameter | Type | Description |
|---|---|---|
| page | string | — |
void—public static void WorkshopPublish(Sandbox.Modals.WorkshopPublishOptions options)
Open a modal that prompts the user to publish content to the workshop
| Parameter | Type | Description |
|---|---|---|
| options | WorkshopPublishOptions | — |
void—No results match this filter.
Properties2
Showing 2 properties
No results match this filter.