BsGUIIntField.h 1004 B

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