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

Author Topic: Change mouse cursor?  (Read 6833 times)

0 Members and 1 Guest are viewing this topic.

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
Change mouse cursor?
« 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

TechRogue

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Change mouse cursor?
« Reply #1 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

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
Change mouse cursor?
« Reply #2 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

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Change mouse cursor?
« Reply #3 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.

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
Change mouse cursor?
« Reply #4 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 :(

TheEnigmist

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Change mouse cursor?
« Reply #5 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 :)

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
Change mouse cursor?
« Reply #6 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

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Change mouse cursor?
« Reply #7 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.