ISteamScreenshots - adambiser/agk-steam-plugin GitHub Wiki

AddScreenshotToLibrary

AddScreenshotToLibrary(filename as string, width as integer, height as integer) as integer

  • filename - The absolute file path to the JPG, PNG, or TGA screenshot.
  • width - The width of the screenshot.
  • height - The height of the screenshot.

Adds a screenshot to the user's Steam screenshot library from disk. A thumbnail is automatically created.

Triggers a ScreenshotReady_t callback.

Returns: A screenshot handle or 0 if the file could not be saved.

Reference:
ISteamScreenshots#AddScreenshotToLibrary

AddVRScreenshotToLibrary

AddVRScreenshotToLibrary(type as integer, filename as string, vrFilename as string) as integer

  • type - The type of VR screenshot that this is.
  • filename - The absolute file path to a 2D JPG, PNG, or TGA version of the screenshot for the library view.
  • vrFilename - The absolute file path to the VR screenshot, this should be the same type of screenshot specified in eType.

Adds a VR screenshot to the user's Steam screenshot library from disk in the supported type.

Triggers a ScreenshotReady_t callback.

Returns: A screenshot handle or 0 if the file could not be saved.

Reference:
ISteamScreenshots#AddVRScreenshotToLibrary

HookScreenshots

HookScreenshots(hook as integer)

  • hook - 1 to enable or 0 to disable hooking.

Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them.

Hooking is disabled by default, and only ever enabled if you do so with this function.

If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response.

Reference:
ISteamScreenshots#HookScreenshots

IsScreenshotsHooked

IsScreenshotsHooked() as integer

Checks if the app is hooking screenshots, or if the Steam Overlay is handling them.

This can be toggled with HookScreenshots.

Returns: 1 if the game is hooking screenshots and is expected to handle them; otherwise, 0.

Reference:
ISteamScreenshots#IsScreenshotsHooked

SetScreenshotLocation

SetScreenshotLocation(hScreenshot as integer, location as string) as integer

  • hScreenshot - The handle to the screenshot to tag.
  • location - The location in the game where this screenshot was taken. This can not be longer than 255 characters.

Sets optional metadata about a screenshot's location. For example, the name of the map it was taken on.

Returns: 1 if the location was successfully added to the screenshot; otherwise, 0.

Reference:
ISteamScreenshots#SetLocation

TagScreenshotPublishedFile

TagScreenshotPublishedFile(hScreenshot as integer, hPublishedFile as integer) as integer

  • hScreenshot - The handle to the screenshot to tag.
  • hPublishedFile - The handle to the workshop item ID that is in the screenshot.

Tags a published file as being visible in the screenshot.

Returns: 1 if the published file was successfully tagged in the screenshot; otherwise, 0.

Reference:
ISteamScreenshots#TagPublishedFile

TagScreenshotUser

TagScreenshotUser(hScreenshot as integer, hSteamID as integer) as integer

  • hScreenshot - The handle to the screenshot to tag.
  • hSteamID - The handle of the Steam ID of a user that is in the screenshot.

Tags a Steam user as being visible in the screenshot.

Returns: 1 if the user was successfully tagged in the screenshot; otherwise, 0.

Reference:
ISteamScreenshots#TagUser

TriggerScreenshot

TriggerScreenshot()

Either causes the Steam Overlay to take a screenshot, or tells your screenshot manager that a screenshot needs to be taken, depending on the value of IsScreenshotsHooked.

If hooking has been enabled, this triggers a ScreenshotRequested_t callback. Otherwise this triggers a ScreenshotReady_t callback when the screenshot has been saved and added to the library.

Reference:
ISteamScreenshots#TriggerScreenshot

WriteScreenshot

WriteScreenshot(imageID as integer) as integer

  • imageID - An image ID.

Writes a screenshot to the user's Steam screenshot library given the image ID.

Returns: A screenshot handle or 0 if there is an error.

Reference:
ISteamScreenshots#WriteScreenshot

HasScreenshotReadyResponse

HasScreenshotReadyResponse() as integer

Triggered after a screenshot was successfully written or otherwise added to the library and can now be tagged.

Returns: 1 when the callback has more responses to process; otherwise 0.

Associated Methods:
GetScreenshotReadyScreenshotHandle
GetScreenshotReadyResult

Reference:
ISteamApps#ScreenshotReady_t

GetScreenshotReadyScreenshotHandle

GetScreenshotReadyScreenshotHandle() as integer

Returns the screenshot handle for the current ScreenshotReady_t callback response.

This method should only be used when HasScreenshotReadyResponse has returned 1.

Returns: A screenshot handle.

Reference:
ISteamApps#ScreenshotReady_t

GetScreenshotReadyResult

GetScreenshotReadyResult() as integer

Returns whether the call was successful for the current ScreenshotReady_t callback response.

This method should only be used when HasScreenshotReadyResponse has returned 1.

Returns: An EResult value.

Reference:
ISteamApps#ScreenshotReady_t

HasScreenshotRequestedResponse

HasScreenshotRequestedResponse() as integer

Triggered when a screenshot has been requested by the user from the Steam screenshot hotkey. This will only be called if HookScreenshots has been enabled, in which case Steam will not take the screenshot itself.

Returns: 1 when a screenshot has been requested.

Reference:
ISteamApps#ScreenshotRequested_t