Watch
2
0
Fork
You've already forked raylib-cs
0

Initial update to 4.2

This commit is contained in:
Rgebee 2022-07-04 07:28:32 +01:00
commit 1a78bc3c53
8 changed files with 153 additions and 39 deletions

View file

@ -70,6 +70,11 @@ namespace Raylib_cs
/// </summary>
FLAG_WINDOW_HIGHDPI = 0x00002000,
/// <summary>
/// Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
/// </summary>
FLAG_WINDOW_MOUSE_PASSTHROUGH = 0x00004000,
/// <summary>
/// Set to try enabling MSAA 4X
/// </summary>
@ -158,6 +163,11 @@ namespace Raylib_cs
/// </summary>
BLEND_SUBTRACT_COLORS,
/// <summary>
/// Blend premultiplied textures considering alpha
/// </summary>
BLEND_ALPHA_PREMULTIPLY,
/// <summary>
/// Blend textures using custom src/dst factors (use rlSetBlendMode())
/// </summary>

View file

@ -190,14 +190,14 @@ namespace Raylib_cs
/// <summary>Get dropped files names (memory should be freed)</summary>
public static string[] GetDroppedFiles()
{
int count;
var buffer = GetDroppedFiles(&count);
var files = new string[count];
var filePathList = LoadDroppedFiles();
var files = new string[filePathList.count];
for (var i = 0; i < count; i++)
for (var i = 0; i < filePathList.count; i++)
{
files[i] = Marshal.PtrToStringUTF8((IntPtr)buffer[i]);
files[i] = Marshal.PtrToStringUTF8((IntPtr)filePathList.paths[i]);
}
UnloadDroppedFiles(filePathList);
return files;
}

View file

@ -67,7 +67,7 @@ namespace Raylib_cs
{
return new CBool { value = (sbyte)(left.value - right.value) };
}
// ToString override
public override string ToString()
{

View file

@ -0,0 +1,27 @@
using System;
using System.Runtime.InteropServices;
namespace Raylib_cs
{
/// <summary>
/// File path list
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FilePathList
{
/// <summary>
/// Filepaths max entries
/// </summary>
public uint capacity;
/// <summary>
/// Filepaths entries count
/// </summary>
public uint count;
/// <summary>
/// Filepaths entries
/// </summary>
public byte** paths;
}
}