BsGUIVector3Field.h 989 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsGUIFieldBase.h"
  4. #include "BsVector3.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_ED_EXPORT GUIVector3Field : public TGUIField<GUIVector3Field>
  8. {
  9. public:
  10. static const String& getGUITypeName();
  11. static const String& getFloatFieldStyleType();
  12. GUIVector3Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
  13. const String& style, const GUIDimensions& dimensions, bool withLabel);
  14. Vector3 getValue() const;
  15. void setValue(const Vector3& value);
  16. bool hasInputFocus() const;
  17. /**
  18. * @copydoc GUIElement::setTint
  19. */
  20. virtual void setTint(const Color& color);
  21. Event<void(const Vector3&)> onValueChanged;
  22. protected:
  23. virtual ~GUIVector3Field() { }
  24. void styleUpdated();
  25. void valueChanged(float newValue);
  26. static const UINT32 ELEMENT_LABEL_WIDTH;
  27. GUIFloatField* mFieldX;
  28. GUIFloatField* mFieldY;
  29. GUIFloatField* mFieldZ;
  30. };
  31. }