AutomationEvent methods added
This commit is contained in:
parent
60fd5d9eaf
commit
1a9973bd2a
2 changed files with 57 additions and 0 deletions
|
|
@ -686,6 +686,40 @@ public static unsafe partial class Raylib
|
||||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void OpenURL(sbyte* url);
|
public static extern void OpenURL(sbyte* url);
|
||||||
|
|
||||||
|
// Automation events functionality
|
||||||
|
|
||||||
|
/// <summary>Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS</summary>
|
||||||
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern AutomationEventList LoadAutomationEventList(sbyte* fileName);
|
||||||
|
|
||||||
|
/// <summary>Unload automation events list from file</summary>
|
||||||
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void UnloadAutomationEventList(AutomationEventList list);
|
||||||
|
|
||||||
|
/// <summary>Export automation events list as text file</summary>
|
||||||
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern CBool ExportAutomationEventList(AutomationEventList list, sbyte* fileName);
|
||||||
|
|
||||||
|
/// <summary>Set automation event list to record to</summary>
|
||||||
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void SetAutomationEventList(AutomationEventList* list);
|
||||||
|
|
||||||
|
/// <summary>Set automation event internal base frame to start recording</summary>
|
||||||
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void SetAutomationEventBaseFrame(int frame);
|
||||||
|
|
||||||
|
/// <summary>Start recording automation events (AutomationEventList must be set)</summary>
|
||||||
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void StartAutomationEventRecording();
|
||||||
|
|
||||||
|
/// <summary>Stop recording automation events</summary>
|
||||||
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void StopAutomationEventRecording();
|
||||||
|
|
||||||
|
/// <summary>Play a recorded automation event</summary>
|
||||||
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void PlayAutomationEvent(AutomationEvent ev);
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Input Handling Functions (Module: core)
|
// Input Handling Functions (Module: core)
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -1329,4 +1329,27 @@ public static unsafe partial class Raylib
|
||||||
{
|
{
|
||||||
return GetScreenToWorldRay(mousePosition, camera);
|
return GetScreenToWorldRay(mousePosition, camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS</summary>
|
||||||
|
public static AutomationEventList LoadAutomationEventList(string fileName)
|
||||||
|
{
|
||||||
|
using var str1 = fileName.ToUtf8Buffer();
|
||||||
|
return LoadAutomationEventList(str1.AsPointer());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Export automation events list as text file</summary>
|
||||||
|
public static CBool ExportAutomationEventList(AutomationEventList list, string fileName)
|
||||||
|
{
|
||||||
|
using var str1 = fileName.ToUtf8Buffer();
|
||||||
|
return ExportAutomationEventList(list, str1.AsPointer());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Set automation event list to record to</summary>
|
||||||
|
public static void SetAutomationEventList(ref AutomationEventList list)
|
||||||
|
{
|
||||||
|
fixed (AutomationEventList* p = &list)
|
||||||
|
{
|
||||||
|
SetAutomationEventList(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue