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
}

build Constructors 1

functions Static Methods 24

Close ()
Closes the top overlay if one exists
CloseAll (immediate)
Close all open overlays
CreateGame (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.
OpenUrl (url)
Asks the user whether they want to open this web page in their browser. Only http and https links are allowed.
RunLocalBenchmarks (packageFilter, testFilter)
Starts a local benchmark run from within the game. The results panel is shown when all packages complete.
ShowBenchmarkResults (batchId, summaries)
ShowBinds ()
Opens a modal that lets you view and rebind game input actions.
ShowFriendsList ()
obsolete
ShowGameModal (packageIdent)
Opens a modal for the specified game package
ShowMapModal (packageIdent)
Opens a modal for the specified map package
ShowMapSelector (onSelect, selected)
ShowNewsModal (newsitem)
Opens a modal for the news item
ShowOrganizationModal (org)
obsolete
Used to open a modal for the specified organization. There isn't one any more - this does nothing.
ShowPackageModal (ident)
Opens a modal for the specified package
ShowPackageSelector (query, onSelect, onFilterChanged)
ShowPauseMenu ()
Opens the pause menu overlay. This is the same menu that appears when pressing Escape, or Shift+Escape in editor play mode.
ShowPlayer (steamid, page)
View a selected user's profile
ShowPlayerList ()
Open a modal that shows a list of players currently in the game
ShowReportModal (packageIdent)
Opens a modal to report the specified package
ShowReviewModal (package)
Opens a modal to review the specified package
ShowServerList (config)
Opens a modal that shows a list of active servers
ShowServiceConnector ()
Shows modal to edit the streaming settings
ShowSettingsModal (page)
Opens the settings. In the menu that's a tab; in a game it goes up over the top. Optionally, you can specify a category to open directly to: "display", "graphics", "audio", "controls", "keybinds", "game", "storage", "developer", "about". The old page names "video" and "input" still work, and land on display and controls.
WorkshopPublish (options)
Open a modal that prompts the user to publish content to the workshop
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.