ISteamFriends¶
List of Functions¶
List of Callbacks¶
Function Reference¶
-
friends.
activateGameOverlay
(dialog)¶ Parameters: dialog (string) – The dialog to open. Valid options are: “friends”, “community”, “players”, “settings”, “officialgamegroup”, “stats”, “achievements”. Returns: nothing SteamWorks: ActivateGameOverlay Activates the Steam Overlay to a specific dialog.
Example:
Steam.friends.activateGameOverlay('stats')
-
friends.
activateGameOverlayToWebPage
(url)¶ Parameters: url (string) – The webpage to open. (A fully qualified address with the protocol is required, e.g. “http://www.steampowered.com”) Returns: nothing SteamWorks: ActivateGameOverlayToWebPage Activates Steam Overlay web browser directly to the specified URL.
Example:
Steam.friends.activateGameOverlayToWebPage('https://www.google.com')
-
friends.
getFriendPersonaName
(steam_id)¶ Parameters: steam_id (uint64) – The Steam ID of the other user. Returns: (string) The current users persona name. Returns an empty string (“”), or “[unknown]” if the Steam ID is invalid or not known to the caller. SteamWorks: GetFriendPersonaName Gets the specified user’s persona (display) name.
This will only be known to the current user if the other user is in their friends list, on the same game server, in a chat room or lobby, or in a small Steam group with the local user.
Example:
steam_id = getSteamIdSomehow()
print("Friend's name is:", Steam.friends.getFriendPersonaName(steam_id))
Callbacks Reference¶
Warning
Remember callbacks are functions that you should override in order to receive the events, and not call directly.
Also, you must constantly call Steam.runCallbacks()
(preferably in your game loop) in order for your callbacks to be called.
-
friends.
onGameOverlayActivated
(data)¶ Parameters: data (table) – A table similar to GameOverlayActivated_t
- data.active (boolean) – true if it’s just been activated, otherwise false.
Returns: nothing SteamWorks: GameOverlayActivated_t Posted when the Steam Overlay activates or deactivates. The game can use this to be pause or resume single player games.
Example:
function Steam.friends.onGameOverlayActivated(data)
print('Overlay active is', data.active)
end