2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-04-05 11:19:39 -04:00

Adding a string method for OpenURL and SetGamepadMappings (#180)

This commit is contained in:
MrScautHD 2023-08-05 00:04:42 +02:00 committed by GitHub
parent 7e0866c222
commit 083a776aee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,20 @@ namespace Raylib_cs
SetClipboardText(str1.AsPointer()); SetClipboardText(str1.AsPointer());
} }
/// <summary>Open URL with default system browser (if available)</summary>
public static void OpenURL(string url)
{
using var str1 = url.ToUTF8Buffer();
OpenURL(str1.AsPointer());
}
/// <summary>Set internal gamepad mappings (SDL_GameControllerDB)</summary>
public static int SetGamepadMappings(string mappings)
{
using var str1 = mappings.ToUTF8Buffer();
return SetGamepadMappings(str1.AsPointer());
}
/// <summary>Load shader from files and bind default locations</summary> /// <summary>Load shader from files and bind default locations</summary>
public static Shader LoadShader(string vsFileName, string fsFileName) public static Shader LoadShader(string vsFileName, string fsFileName)
{ {