BsGUIVector4Field.h 1016 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsGUIFieldBase.h"
  4. #include "BsVector4.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_ED_EXPORT GUIVector4Field : public TGUIField<GUIVector4Field>
  8. {
  9. public:
  10. static const String& getGUITypeName();
  11. static const String& getFloatFieldStyleType();
  12. GUIVector4Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
  13. const String& style, const GUIDimensions& dimensions, bool withLabel);
  14. Vector4 getValue() const;
  15. void setValue(const Vector4& value);
  16. bool hasInputFocus() const;
  17. /**
  18. * @copydoc GUIElement::setTint
  19. */
  20. virtual void setTint(const Color& color);
  21. Event<void(const Vector4&)> onValueChanged;
  22. protected:
  23. virtual ~GUIVector4Field() { }
  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. GUIFloatField* mFieldW;
  31. };
  32. }