Ordering readings
Added "SaveFileData" overload to "Raylib.Utils" Moved "SaveFileText" from "RaylibExtensions" to "Raylib.Utils" Moved "LoadFileText" from "RaylibExtensions" to "Raylib.Utils" Raymath's const "NativeLibName" is now referencing to "Raylib.NativeLibName" Color constructors are more readable Added "Dimensions" property to "Image" Changed all the "var" for explicit types on the "Logging" class Changed "Int64" for "long" on CBool, and using constructor on the operators instead setting the value manually Added indexer to "FilePathLists" Changed all "var" for explicit types on "Utf8Buffer" New "GetRandomSequence" method overloads in "Raylib.Utils" acepting "int" and "float"
This commit is contained in:
parent
c0a9549454
commit
9811c0d129
11 changed files with 140 additions and 60 deletions
|
|
@ -6,23 +6,6 @@ namespace Raylib_cs;
|
|||
|
||||
public static class RaylibExtensions
|
||||
{
|
||||
public static unsafe void SaveFileText(string fileName, string text)
|
||||
{
|
||||
using AnsiBuffer fileBuffer = fileName.ToAnsiBuffer();
|
||||
using AnsiBuffer textBuffer = text.ToAnsiBuffer();
|
||||
Raylib.SaveFileText(fileBuffer.AsPointer(), textBuffer.AsPointer());
|
||||
}
|
||||
|
||||
public static unsafe string LoadFileText(string fileName)
|
||||
{
|
||||
using AnsiBuffer nameBuffer = fileName.ToAnsiBuffer();
|
||||
sbyte* data = Raylib.LoadFileText(nameBuffer.AsPointer());
|
||||
//string text = new string(data);
|
||||
string text = System.Runtime.InteropServices.Marshal.PtrToStringUTF8((System.IntPtr)data);
|
||||
Raylib.UnloadFileText(data);
|
||||
return text;
|
||||
}
|
||||
|
||||
#region Rectangle
|
||||
|
||||
public static void Draw(this Rectangle rectangle, Color color)
|
||||
|
|
|
|||
Loading…
Reference in a new issue