C# Class Steamworks.SteamScreenshots

Afficher le fichier Open project: rlabrecque/Steamworks.NET Class Usage Examples

Méthodes publiques

Méthode Description
AddScreenshotToLibrary ( string pchFilename, string pchThumbnailFilename, int nWidth, int nHeight ) : ScreenshotHandle

Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio

as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format.

The return value is a handle that is valid for the duration of the game process and can be used to apply tags.

JPEG, TGA, and PNG formats are supported.

AddVRScreenshotToLibrary ( EVRScreenshotType eType, string pchFilename, string pchVRFilename ) : ScreenshotHandle

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

pchFilename should be the normal 2D image used in the library view

pchVRFilename should contain the image that matches the correct type

The return value is a handle that is valid for the duration of the game process and can be used to apply tags.

JPEG, TGA, and PNG formats are supported.

HookScreenshots ( bool bHook ) : void

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

then the ScreenshotRequested_t callback will be sent if the user presses the hotkey, and the game is expected to call WriteScreenshot or AddScreenshotToLibrary

in response.

IsScreenshotsHooked ( ) : bool

Returns true if the app has hooked the screenshot

SetLocation ( ScreenshotHandle hScreenshot, string pchLocation ) : bool

Sets metadata about a screenshot's location (for example, the name of the map)

TagPublishedFile ( ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID ) : bool

Tags a published file as being visible in the screenshot

TagUser ( ScreenshotHandle hScreenshot, CSteamID steamID ) : bool

Tags a user as being visible in the screenshot

TriggerScreenshot ( ) : void

Causes the Steam overlay to take a screenshot. If screenshots are being hooked by the game then a ScreenshotRequested_t callback is sent back to the game instead.

WriteScreenshot ( byte pubRGB, uint cubRGB, int nWidth, int nHeight ) : ScreenshotHandle

Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format.

The return value is a handle that is valid for the duration of the game process and can be used to apply tags.

Method Details

AddScreenshotToLibrary() public static méthode

Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio

as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format.

The return value is a handle that is valid for the duration of the game process and can be used to apply tags.

JPEG, TGA, and PNG formats are supported.

public static AddScreenshotToLibrary ( string pchFilename, string pchThumbnailFilename, int nWidth, int nHeight ) : ScreenshotHandle
pchFilename string
pchThumbnailFilename string
nWidth int
nHeight int
Résultat ScreenshotHandle

AddVRScreenshotToLibrary() public static méthode

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

pchFilename should be the normal 2D image used in the library view

pchVRFilename should contain the image that matches the correct type

The return value is a handle that is valid for the duration of the game process and can be used to apply tags.

JPEG, TGA, and PNG formats are supported.

public static AddVRScreenshotToLibrary ( EVRScreenshotType eType, string pchFilename, string pchVRFilename ) : ScreenshotHandle
eType EVRScreenshotType
pchFilename string
pchVRFilename string
Résultat ScreenshotHandle

HookScreenshots() public static méthode

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

then the ScreenshotRequested_t callback will be sent if the user presses the hotkey, and the game is expected to call WriteScreenshot or AddScreenshotToLibrary

in response.

public static HookScreenshots ( bool bHook ) : void
bHook bool
Résultat void

IsScreenshotsHooked() public static méthode

Returns true if the app has hooked the screenshot

public static IsScreenshotsHooked ( ) : bool
Résultat bool

SetLocation() public static méthode

Sets metadata about a screenshot's location (for example, the name of the map)

public static SetLocation ( ScreenshotHandle hScreenshot, string pchLocation ) : bool
hScreenshot ScreenshotHandle
pchLocation string
Résultat bool

TagPublishedFile() public static méthode

Tags a published file as being visible in the screenshot

public static TagPublishedFile ( ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID ) : bool
hScreenshot ScreenshotHandle
unPublishedFileID PublishedFileId_t
Résultat bool

TagUser() public static méthode

Tags a user as being visible in the screenshot

public static TagUser ( ScreenshotHandle hScreenshot, CSteamID steamID ) : bool
hScreenshot ScreenshotHandle
steamID CSteamID
Résultat bool

TriggerScreenshot() public static méthode

Causes the Steam overlay to take a screenshot. If screenshots are being hooked by the game then a ScreenshotRequested_t callback is sent back to the game instead.

public static TriggerScreenshot ( ) : void
Résultat void

WriteScreenshot() public static méthode

Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format.

The return value is a handle that is valid for the duration of the game process and can be used to apply tags.

public static WriteScreenshot ( byte pubRGB, uint cubRGB, int nWidth, int nHeight ) : ScreenshotHandle
pubRGB byte
cubRGB uint
nWidth int
nHeight int
Résultat ScreenshotHandle