Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Need help to change the mouse cursor  (Read 1077 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 9
    • View Profile
Need help to change the mouse cursor
« on: December 02, 2018, 01:33:30 pm »
I want to change my mouse pointer in my SFML application. (using SFML 2.5.1 on Linux)

I have used the following steps from the documentation:
sf::Cursor cursor;
cursor.loadFromPixels(image.getPixelsPtr(), image.getSize(), {0, 0});

The image I want to use as a mouse pointer is a red rectangle in PNG format

When I start the application, the mouse pointer is rendered strange.

Instead of the white lines, the mouse pointer should normally be displayed.

Do I lose any data when loading the image, so I get such an output?
« Last Edit: December 02, 2018, 01:35:33 pm by 6Peppered9 »