steamworks.showGameOverlay()

Type Function
Return value Boolean
Revision Release 2022.3683
Keywords steam, steamworks, overlay, showGameOverlay
See also steamworks.canShowOverlay
steamworks.showStoreOverlay()
steamworks.showUserOverlay()
steamworks.showWebOverlay()
steamworks.*

Overview

Displays a Steam overlay on top of the application window. This overlay shows information related to the game currently being played such as its main community page, user stats, achievements, etc. This is the same overlay that Shift+Tab would normally display.

Returns true if Steam is able to display the overlay.

Gotchas

This function will return false — and the overlay will not show — in the following cases:

Syntax

steamworks.showGameOverlay( [overlayName] )
overlayName (optional)

String. Unique name of the overlay to be displayed from among the following options. If you omit this argument or if the given name is unknown, Steam defaults to displaying what was last shown in the game overlay. If an overlay was not displayed before, Steam defaults to displaying the game's main overlay which is normally shown when pressing Shift+Tab.

  • "Achievements"
  • "Community"
  • "Friends"
  • "OfficialGameGroup"
  • "Players"
  • "Settings"
  • "Stats"

Example

local steamworks = require( "plugin.steamworks" )

-- Attempt to show the user's current achievements
local wasShown = steamworks.showGameOverlay( "Achievements" )

if not wasShown then
    print( "Failed to display the overlay." )
end