121 void setDrag(
ImagePtr image, int32_t drag_offset_x=0, int32_t drag_offset_y=0);
Abstract interface for all the renderbackends.
MouseCursorType m_cursor_type
MouseCursorType m_drag_type
TimeManager * m_timemanager
virtual ~Cursor()
Destructor.
ImagePtr getImage()
Gets the current mouse image.
ImagePtr m_cursor_drag_image
MouseCursorType
Defines the type of shown cursor native -> default cursor image -> cursor from image pool animation -...
void setDrag(ImagePtr image, int32_t drag_offset_x=0, int32_t drag_offset_y=0)
Sets the current drag image cursor.
AnimationPtr m_cursor_animation
void setNativeCursor(uint32_t cursor_id)
Sets the cursor to a native type.
MouseCursorType getType() const
Gets the current mouse cursor type.
virtual void draw()
draws cursor on screen
AnimationPtr getAnimation()
Gets the current mouse animation.
uint32_t getId() const
Gets the current mouse cursor handle.
MouseCursorType getDragType() const
Gets the current mouse cursor type.
void set(uint32_t cursor_id=0)
Sets the current mouse cursor.
void resetDrag()
Resets the cursor drag type to CURSOR_NONE.
uint32_t getNativeId(uint32_t cursor_id)
To get some consistancy between platforms, this function checks if cursor_id matches any of the value...
AnimationPtr m_cursor_drag_animation
Cursor(RenderBackend *renderbackend)
Constructor.
Cursor class manages mouse cursor handling.
AnimationPtr getDragAnimation()
Gets the current mouse drag animation.
void getPosition(int32_t *x, int32_t *y)
Get the current mouse position.
uint32_t getY() const
Gets the current mouse y position.
RenderBackend * m_renderbackend
SDL_Cursor * m_native_cursor
NativeCursor
Defines some common native cursors between platforms.
ImagePtr getDragImage()
Gets the current mouse drag image.
uint32_t getX() const
Gets the current mouse x position.
void setPosition(uint32_t x, uint32_t y)
Set the mouse position.