BsGUIFloatField.h 899 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsGUIFieldBase.h"
  4. namespace BansheeEngine
  5. {
  6. class BS_ED_EXPORT GUIFloatField : public TGUIField<GUIFloatField>
  7. {
  8. public:
  9. static const String& getGUITypeName();
  10. GUIFloatField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
  11. const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
  12. float getValue() const;
  13. void setValue(float value);
  14. protected:
  15. virtual ~GUIFloatField();
  16. void updateClippedBounds();
  17. protected:
  18. static const float DRAG_SPEED;
  19. GUIInputBox* mInputBox;
  20. INT32 mLastDragPos;
  21. bool mIsDragging;
  22. bool _hasCustomCursor(const Vector2I position, CursorType& type) const;
  23. virtual bool mouseEvent(const GUIMouseEvent& ev);
  24. static bool floatFilter(const WString& str);
  25. };
  26. }