Fork of mellinoe/ImGui.NET, an ImGui wrapper for .NET, which includes access to internal functions.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

28 lines
1.3 KiB

using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;
namespace ImGuiNET
{
public unsafe partial struct ImGuiKeyData
{
public byte Down;
public float DownDuration;
public float DownDurationPrev;
public float AnalogValue;
}
public unsafe partial struct ImGuiKeyDataPtr
{
public ImGuiKeyData* NativePtr { get; }
public ImGuiKeyDataPtr(ImGuiKeyData* nativePtr) => NativePtr = nativePtr;
public ImGuiKeyDataPtr(IntPtr nativePtr) => NativePtr = (ImGuiKeyData*)nativePtr;
public static implicit operator ImGuiKeyDataPtr(ImGuiKeyData* nativePtr) => new ImGuiKeyDataPtr(nativePtr);
public static implicit operator ImGuiKeyData* (ImGuiKeyDataPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiKeyDataPtr(IntPtr nativePtr) => new ImGuiKeyDataPtr(nativePtr);
public ref bool Down => ref Unsafe.AsRef<bool>(&NativePtr->Down);
public ref float DownDuration => ref Unsafe.AsRef<float>(&NativePtr->DownDuration);
public ref float DownDurationPrev => ref Unsafe.AsRef<float>(&NativePtr->DownDurationPrev);
public ref float AnalogValue => ref Unsafe.AsRef<float>(&NativePtr->AnalogValue);
}
}