HandleSliderDisc.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using BansheeEngine;
  4. namespace BansheeEditor
  5. {
  6. public sealed class HandleSliderDisc : HandleSlider
  7. {
  8. public HandleSliderDisc(Handle parentHandle, Vector3 normal, float radius, bool fixedScale = true)
  9. :base(parentHandle)
  10. {
  11. Internal_CreateInstance(this, normal, radius, fixedScale);
  12. }
  13. public Degree Delta
  14. {
  15. get
  16. {
  17. float value;
  18. Internal_GetDelta(mCachedPtr, out value);
  19. return value;
  20. }
  21. }
  22. public Degree StartAngle
  23. {
  24. get
  25. {
  26. float value;
  27. Internal_GetStartAngle(mCachedPtr, out value);
  28. return value;
  29. }
  30. }
  31. [MethodImpl(MethodImplOptions.InternalCall)]
  32. private static extern void Internal_CreateInstance(HandleSliderDisc instance, Vector3 normal, float radius, bool fixedScale);
  33. [MethodImpl(MethodImplOptions.InternalCall)]
  34. private static extern void Internal_GetDelta(IntPtr nativeInstance, out float value);
  35. [MethodImpl(MethodImplOptions.InternalCall)]
  36. private static extern void Internal_GetStartAngle(IntPtr nativeInstance, out float value);
  37. }
  38. }