HandleSliderDisc.cs 973 B

12345678910111213141516171819202122232425262728293031
  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, float snapValue = 0.0f)
  9. :base(parentHandle)
  10. {
  11. Internal_CreateInstance(this, normal, radius, fixedScale);
  12. }
  13. public float Delta
  14. {
  15. get
  16. {
  17. float value;
  18. Internal_GetDelta(mCachedPtr, out value);
  19. return value;
  20. }
  21. }
  22. [MethodImpl(MethodImplOptions.InternalCall)]
  23. private static extern void Internal_CreateInstance(HandleSliderDisc instance, Vector3 normal, float radius, bool fixedScale);
  24. [MethodImpl(MethodImplOptions.InternalCall)]
  25. private static extern void Internal_GetDelta(IntPtr nativeInstance, out float value);
  26. }
  27. }