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.
// 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 }
Overlay |
IsOpen | Returns true if any overlay is open |
IsPauseMenuOpen | Returns true if the pause menu overlay is open |
CreateGame | Opens a modal to create a multiplayer game. 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 |
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 |