Summary
Provides static methods for displaying various modal overlays in the game UI.
The 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.
Examples
// Show a modal for a specific game package
Game.Overlay.ShowGameModal("facepunch.sandbox");
// Check if any overlay is currently open
if (Game.Overlay.IsOpen)
{
// Pause game logic or input
}
Constructors
Properties
Static Methods
| Close |
Closes the top overlay if one exists |
| CloseAll |
Close all open overlays |
| CreateGame |
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. |
| ShowBinds |
Opens a modal that lets you view and rebind game input actions. |
| ShowFriendsList |
Opens a modal that shows the user's friends list |
| ShowGameModal |
Opens a modal for the specified game package |
| ShowMapModal |
Opens a modal for the specified map package |
| ShowNewsModal |
Opens a modal for the news item |
| ShowOrganizationModal |
Opens a modal for the specified organization.
This is most likely called from a Package - so get the organization from there. |
| ShowPackageModal |
Opens a modal for the specified package |
| ShowPackageSelector |
|
| ShowPlayer |
View a selected user's profile |
| ShowPlayerList |
Open a modal that shows a list of players currently in the game |
| ShowReviewModal |
Opens a modal to review the specified package |
| ShowServerList |
Opens a modal that shows a list of active servers |
| ShowSettingsModal |
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" |
| WorkshopPublish |
Open a modal that prompts the user to publish content to the workshop |