mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-02-03 17:20:45 +03:00
Merge pull request #514 from Noek1993/master
Added support for FilterText
This commit is contained in:
commit
b47e1e6f55
@ -756,7 +756,7 @@ namespace Steamworks
|
||||
//
|
||||
// ETextFilteringContext
|
||||
//
|
||||
internal enum TextFilteringContext : int
|
||||
public enum TextFilteringContext : int
|
||||
{
|
||||
Unknown = 0,
|
||||
GameContent = 1,
|
||||
|
@ -261,5 +261,21 @@ namespace Steamworks
|
||||
/// Returns whether this steam client is a Steam China specific client, vs the global client
|
||||
/// </summary>
|
||||
public static bool IsSteamChinaLauncher => Internal.IsSteamChinaLauncher();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes text filtering, loading dictionaries for the language the game is running in.
|
||||
/// Users can customize the text filter behavior in their Steam Account preferences
|
||||
/// </summary>
|
||||
public static bool InitFilterText() => Internal.InitFilterText( 0 );
|
||||
|
||||
/// <summary>
|
||||
/// Filters the provided input message and places the filtered result into pchOutFilteredText,
|
||||
/// using legally required filtering and additional filtering based on the context and user settings.
|
||||
/// </summary>
|
||||
public string FilterText( TextFilteringContext context, SteamId sourceSteamID, string inputMessage )
|
||||
{
|
||||
Internal.FilterText( context, sourceSteamID, inputMessage, out var filteredString );
|
||||
return filteredString;
|
||||
}
|
||||
}
|
||||
}
|
@ -144,6 +144,7 @@ public static class Cleanup
|
||||
if ( name == "NetDebugOutput" ) return "public";
|
||||
if ( name == "ItemPreviewType" ) return "public";
|
||||
if ( name == "OverlayToStoreFlag" ) return "public";
|
||||
if ( name == "TextFilteringContext " ) return "public";
|
||||
|
||||
return "internal";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user