steamworks.showUserOverlay()

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

Overview

Displays a Steam overlay on top of the application window. This overlay is used to interact with or show information about another user.

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.showUserOverlay( userSteamId [, overlayName] )
userSteamId (required)

String. Unique string ID of the user to interact with in the overlay.

overlayName (optional)

String. Unique name of the overlay to be displayed from among the following options. If you omit this argument, this function will default to the "steamid" overlay which displays profile information about that user.

  • "steamid"
  • "chat"
  • "jointrade"
  • "stats"
  • "achievements"
  • "friendadd"
  • "friendremove"
  • "friendrequestaccept"
  • "friendrequestignore"

Example

local steamworks = require( "plugin.steamworks" )

-- Attempt to show a friend's achievements on screen
local friendSteamId = "FRIEND_ID"

local wasShown = steamworks.showUserOverlay( friendSteamId, "achievements" )

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