Unstable 1.1.14.0
This commit is contained in:
@@ -8,16 +8,20 @@ using Steamworks.Data;
|
||||
namespace Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// Class for utilizing the Steam Screenshots API.
|
||||
/// </summary>
|
||||
public class SteamScreenshots : SteamClientClass<SteamScreenshots>
|
||||
{
|
||||
internal static ISteamScreenshots? Internal => Interface as ISteamScreenshots;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
internal override bool InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamScreenshots( server ) );
|
||||
if ( Interface is null || Interface.Self == IntPtr.Zero ) return false;
|
||||
|
||||
InstallEvents();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
@@ -33,19 +37,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A screenshot has been requested by the user from the Steam screenshot hotkey.
|
||||
/// This will only be called if Hooked is true, in which case Steam
|
||||
/// Invoked when a screenshot has been requested by the user from the Steam screenshot hotkey.
|
||||
/// This will only be called if <see cref="Hooked"/> is true, in which case Steam
|
||||
/// will not take the screenshot itself.
|
||||
/// </summary>
|
||||
public static event Action? OnScreenshotRequested;
|
||||
|
||||
/// <summary>
|
||||
/// A screenshot successfully written or otherwise added to the library and can now be tagged.
|
||||
/// Invoked when a screenshot has been successfully written or otherwise added to the library and can now be tagged.
|
||||
/// </summary>
|
||||
public static event Action<Screenshot>? OnScreenshotReady;
|
||||
|
||||
/// <summary>
|
||||
/// A screenshot attempt failed
|
||||
/// Invoked when a screenshot attempt failed.
|
||||
/// </summary>
|
||||
public static event Action<Result>? OnScreenshotFailed;
|
||||
|
||||
@@ -85,15 +89,17 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Causes the Steam overlay to take a screenshot.
|
||||
/// If screenshots are being hooked by the game then a
|
||||
/// ScreenshotRequested callback is sent back to the game instead.
|
||||
/// <see cref="OnScreenshotRequested"/> callback is sent back to the game instead.
|
||||
/// </summary>
|
||||
public static void TriggerScreenshot() => Internal?.TriggerScreenshot();
|
||||
|
||||
/// <summary>
|
||||
/// Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them.
|
||||
/// <para>
|
||||
/// 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.
|
||||
/// If the hooking is enabled, then the <see cref="OnScreenshotRequested"/> callback will be sent if the user presses the hotkey or
|
||||
/// when TriggerScreenshot is called, and then the game is expected to call <see cref="WriteScreenshot(byte[], int, int)"/> or <see cref="AddScreenshot(string, string, int, int)"/> in response.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static bool Hooked
|
||||
{
|
||||
@@ -101,4 +107,4 @@ namespace Steamworks
|
||||
set => Internal?.HookScreenshots( value );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user