FixedJointInspector.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using BansheeEngine;
  4. namespace BansheeEditor
  5. {
  6. /** @addtogroup Inspectors
  7. * @{
  8. */
  9. /// <summary>
  10. /// Renders an inspector for the <see cref="FixedJoint"/> component.
  11. /// </summary>
  12. [CustomInspector(typeof(FixedJoint))]
  13. internal class FixedJointInspector : JointInspector
  14. {
  15. /// <inheritdoc/>
  16. protected internal override void Initialize()
  17. {
  18. FixedJoint joint = InspectedObject as FixedJoint;
  19. if (joint != null)
  20. BuildGUI(joint, false);
  21. }
  22. /// <inheritdoc/>
  23. protected internal override InspectableState Refresh()
  24. {
  25. FixedJoint joint = InspectedObject as FixedJoint;
  26. if (joint == null)
  27. return InspectableState.NotModified;
  28. Refresh(joint);
  29. InspectableState oldState = modifyState;
  30. if (modifyState.HasFlag(InspectableState.Modified))
  31. modifyState = InspectableState.NotModified;
  32. return oldState;
  33. }
  34. }
  35. /** @} */
  36. }