SFML community forums

Help => General => Topic started by: Elgan on January 21, 2012, 03:19:24 am

Title: Change mouse cursor?
Post by: Elgan on January 21, 2012, 03:19:24 am
Hello!

is it possible through sfml to change the mouse cursor? Ive no idea how standard this is
Title: Change mouse cursor?
Post by: TechRogue on January 21, 2012, 06:22:51 am
With SFML, no it isn't. You'd have to use the specific libraries for the platform you're developing on.

There's some code on the old wiki which might help you out. It only works on Windows and Linux, and I can only confirm the code for Linux to be working (I actually fixed some if it).

http://www.sfml-dev.org/wiki/en/tutoriels/cursor
Title: Change mouse cursor?
Post by: Elgan on January 21, 2012, 02:22:58 pm
Thanx v.much....thought as much.

bit annoying actually :(

well I may go down picture route :(..

thank you
Title: Change mouse cursor?
Post by: Walker on January 21, 2012, 04:25:49 pm
I'm not really sure what people have against just drawing a sprite and hiding the OS cursor.
Title: Change mouse cursor?
Post by: Elgan on January 21, 2012, 04:49:44 pm
Quote from: "Walker"
I'm not really sure what people have against just drawing a sprite and hiding the OS cursor.


I may go down this route, just means I have to include the sprites and find images:P

I suck at images :(
Title: Change mouse cursor?
Post by: TheEnigmist on January 21, 2012, 04:51:30 pm
Quote from: "Walker"
I'm not really sure what people have against just drawing a sprite and hiding the OS cursor.

This.
Simple and fast, i think, and you can do all you want :lol

Quote from: "Elgan"
Quote from: "Walker"
I'm not really sure what people have against just drawing a sprite and hiding the OS cursor.


I may go down this route, just means I have to include the sprites and find images:P

I suck at images :(


http://www.appleblossomart.com/cursors.htm
Google :)
Title: Change mouse cursor?
Post by: Elgan on January 21, 2012, 06:58:08 pm
hehe thank you

a few reasons really:
...it means I have to pack the images...I may release what I'm working on to show.
..I'm also near blind so not a fan of images :P
...I want 5 different cursors :(

however thanx, will go down image rout anyway
Title: Change mouse cursor?
Post by: Mario on January 21, 2012, 10:18:16 pm
Hardware cursors can be really useful, if you'd like to show the cursor even while being close to the border (in windowed mode). In fullscreen there's no difference, but there's the border of the screen anyway. Also, the cursor can still be moved while the application "hangs" (e.g. during some loading screen), which still gives the user some feedback to see the computer/game didn't freeze.