110 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
MouseCursorType getDragType() const
Gets the current mouse cursor type.
virtual ~Cursor()
Destructor.
ImagePtr getImage()
Gets the current mouse image.
bool m_native_image_cursor_enabled
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.
void setNativeImageCursorEnabled(bool native_image_cursor_enabled)
Enables or disables the native image cursor feature.
virtual void draw()
draws cursor on screen
AnimationPtr getAnimation()
Gets the current mouse animation.
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...
ImagePtr m_native_cursor_image
AnimationPtr m_cursor_drag_animation
Cursor(RenderBackend *renderbackend)
Constructor.
Cursor class manages mouse cursor handling.
AnimationPtr getDragAnimation()
Gets the current mouse drag animation.
bool setNativeImageCursor(ImagePtr image)
Sets the SDL cursor to the specified image.
void getPosition(int32_t *x, int32_t *y)
Get the current mouse position.
RenderBackend * m_renderbackend
uint32_t getId() const
Gets the current mouse cursor handle.
SDL_Cursor * m_native_cursor
uint32_t getX() const
Gets the current mouse x position.
ImagePtr getDragImage()
Gets the current mouse drag image.
bool isNativeImageCursorEnabled() const
Returns whether cursors set to an image or an animation are drawn natively.
void setPosition(uint32_t x, uint32_t y)
Set the mouse position.
uint32_t getY() const
Gets the current mouse y position.