HandleSliderLine.cs 959 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using BansheeEngine;
  4. namespace BansheeEditor
  5. {
  6. public sealed class HandleSliderLine : HandleSlider
  7. {
  8. public HandleSliderLine(Handle parentHandle, Vector3 direction, float length, bool fixedScale = true)
  9. :base(parentHandle)
  10. {
  11. Internal_CreateInstance(this, direction, length, 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(HandleSliderLine instance, Vector3 direction, float length, bool fixedScale);
  24. [MethodImpl(MethodImplOptions.InternalCall)]
  25. private static extern void Internal_GetDelta(IntPtr nativeInstance, out float value);
  26. }
  27. }