(61d00a474) v0.9.7.1

This commit is contained in:
Regalis
2020-03-04 13:04:10 +01:00
parent 3c50efa5c9
commit 3c09ebe02f
5086 changed files with 786063 additions and 295871 deletions
@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
/// <summary>
/// Undocumented Parental Settings
/// </summary>
public static class SteamParental
{
static ISteamParentalSettings _internal;
internal static ISteamParentalSettings Internal
{
get
{
SteamClient.ValidCheck();
if ( _internal == null )
{
_internal = new ISteamParentalSettings();
_internal.Init();
}
return _internal;
}
}
internal static void Shutdown()
{
_internal = null;
}
internal static void InstallEvents()
{
SteamParentalSettingsChanged_t.Install( x => OnSettingsChanged?.Invoke() );
}
/// <summary>
/// Parental Settings Changed
/// </summary>
public static event Action OnSettingsChanged;
/// <summary>
///
/// </summary>
public static bool IsParentalLockEnabled => Internal.BIsParentalLockEnabled();
/// <summary>
///
/// </summary>
public static bool IsParentalLockLocked => Internal.BIsParentalLockLocked();
/// <summary>
///
/// </summary>
public static bool IsAppBlocked( AppId app ) => Internal.BIsAppBlocked( app.Value );
/// <summary>
///
/// </summary>
public static bool BIsAppInBlockList( AppId app ) => Internal.BIsAppInBlockList( app.Value );
/// <summary>
///
/// </summary>
public static bool IsFeatureBlocked( ParentalFeature feature ) => Internal.BIsFeatureBlocked( feature );
/// <summary>
///
/// </summary>
public static bool BIsFeatureInBlockList( ParentalFeature feature ) => Internal.BIsFeatureInBlockList( feature );
}
}