BsGUIDockSlider.h 893 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsGUIButtonBase.h"
  4. #include "BsDockManager.h"
  5. #include "BsEvent.h"
  6. namespace BansheeEngine
  7. {
  8. class GUIDockSlider : public GUIButtonBase
  9. {
  10. public:
  11. static const String& getGUITypeName();
  12. static GUIDockSlider* create(bool horizontal, const String& styleName = StringUtil::BLANK);
  13. static GUIDockSlider* create(bool horizontal, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
  14. Event<void(const Vector2I&)> onDragged;
  15. protected:
  16. virtual bool mouseEvent(const GUIMouseEvent& ev);
  17. bool _hasCustomCursor(const Vector2I position, CursorType& type) const;
  18. private:
  19. Vector2I mLastDragPosition;
  20. bool mHorizontal;
  21. bool mIsCursorSet;
  22. bool mDragInProgress;
  23. GUIDockSlider(bool horizontal, const String& styleName, const GUILayoutOptions& layoutOptions);
  24. };
  25. }