IGUIUtility.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using UnityEngine;
  2. namespace UnityEditor.U2D.Sprites
  3. {
  4. internal interface IGUIUtility
  5. {
  6. int GetPermanentControlID();
  7. int hotControl { get; set; }
  8. int keyboardControl { get; set; }
  9. int GetControlID(int hint, FocusType focus);
  10. }
  11. internal class GUIUtilitySystem : IGUIUtility
  12. {
  13. public int GetPermanentControlID()
  14. {
  15. return GUIUtility.GetPermanentControlID();
  16. }
  17. public int hotControl
  18. {
  19. get
  20. {
  21. return GUIUtility.hotControl;
  22. }
  23. set
  24. {
  25. GUIUtility.hotControl = value;
  26. }
  27. }
  28. public int keyboardControl
  29. {
  30. get
  31. {
  32. return GUIUtility.keyboardControl;
  33. }
  34. set
  35. {
  36. GUIUtility.keyboardControl = value;
  37. }
  38. }
  39. public int GetControlID(int hint, FocusType focus)
  40. {
  41. return GUIUtility.GetControlID(hint, focus);
  42. }
  43. }
  44. }