From 794b82de0e85c1042ad21792a84262f8800217dd Mon Sep 17 00:00:00 2001 From: ChrisDill Date: Thu, 11 Nov 2021 12:00:42 +0000 Subject: [PATCH] Minor fixes - Rename Gestures enum to Gesture - Update tests to net6.0 --- Raylib-cs.Tests/Raylib-cs.Tests.csproj | 2 +- Raylib-cs/Raylib.cs | 17 +++++++++-------- Raylib-cs/types/Input.cs | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Raylib-cs.Tests/Raylib-cs.Tests.csproj b/Raylib-cs.Tests/Raylib-cs.Tests.csproj index 1b23439..0518e96 100644 --- a/Raylib-cs.Tests/Raylib-cs.Tests.csproj +++ b/Raylib-cs.Tests/Raylib-cs.Tests.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 ../Logo/raylib-cs.ico true diff --git a/Raylib-cs/Raylib.cs b/Raylib-cs/Raylib.cs index beaf96f..ec9de42 100644 --- a/Raylib-cs/Raylib.cs +++ b/Raylib-cs/Raylib.cs @@ -24,14 +24,15 @@ namespace Raylib_cs /// /// Logging: Redirect trace log messages /// WARNING: This callback is intended for advance users - /// + /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void TraceLogCallback(TraceLogLevel logLevel, string text, IntPtr args); + /// /// FileIO: Load binary data /// WARNING: This callback is intended for advance users - /// - /// refers to a unsigned char * + /// + /// refers to a unsigned char * [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate IntPtr LoadFileDataCallback(string fileName, ref int bytesRead); @@ -776,16 +777,16 @@ namespace Raylib_cs /// Enable a set of gestures using flags [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void SetGesturesEnabled(Gestures flags); + public static extern void SetGesturesEnabled(Gesture flags); /// Check if a gesture have been detected [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.I1)] - public static extern bool IsGestureDetected(Gestures gesture); + public static extern bool IsGestureDetected(Gesture gesture); /// Get latest detected gesture [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Gestures GetGestureDetected(); + public static extern Gesture GetGestureDetected(); /// Get touch points count [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] @@ -1449,7 +1450,7 @@ namespace Raylib_cs /// Set color formatted into destination pixel pointer [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void SetPixelColor(IntPtr srcPtr, Color color, PixelFormat format); + public static extern void SetPixelColor(IntPtr dstPtr, Color color, PixelFormat format); /// Get pixel data size in bytes for certain format [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] @@ -1854,7 +1855,7 @@ namespace Raylib_cs [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void DrawBillboardRec(Camera3D camera, Texture2D texture, Rectangle source, Vector3 center, float size, Color tint); - // Draw a billboard texture defined by source and rotation + /// Draw a billboard texture defined by source and rotation [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void DrawBillboardPro(Camera3D camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); diff --git a/Raylib-cs/types/Input.cs b/Raylib-cs/types/Input.cs index 18677ae..cc1030b 100644 --- a/Raylib-cs/types/Input.cs +++ b/Raylib-cs/types/Input.cs @@ -350,10 +350,10 @@ namespace Raylib_cs GAMEPAD_BUTTON_RIGHT_THUMB } - /// Gestures + /// Gesture /// NOTE: It could be used as flags to enable only some gestures [Flags] - public enum Gestures + public enum Gesture { GESTURE_NONE = 0, GESTURE_TAP = 1,