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

Author Topic: bitmask cursor  (Read 13313 times)

0 Members and 1 Guest are viewing this topic.

vurentjie

  • Newbie
  • *
  • Posts: 31
    • View Profile
bitmask cursor
« on: June 29, 2008, 03:36:58 am »
hi,

this is not really a feature request,

i am adding some bitmask cursors into an application i am building,
they consist of some of the standard cursor types,

i am going to build it into the sfml window package.basically what i will do is have a method say, sfCreate_Cursor(cursor type), and this will automatically hide the default cursor, and display the created cursor which is created from a preset array,

i need this for my prog,  i havent seen it in the source or manual, didnt look very hard though, but wanted to know if you would be interested in this

actually now that i think about this the implentation might be difficult, as the cursor would have to be drawn i guess last in a 2d-opengl overlay, so not quite sure how this would fit in, perhaps if it sounds like something that might add to sfml and you interested, you could give thoughts on the implementation,

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
bitmask cursor
« Reply #1 on: June 29, 2008, 07:07:22 am »
Hi

I not going to provide such feature, because it's very easy to implement :
- Hide the OS cursor with the ShowMouseCursor function
- Load your own cursor with a sf::Image and a sf::Sprite
- Draw it at mouse coordinates just before the call to Display

As a consequence, if you want to implement your own built-in features, you'd better do it in the graphics package, not the window one.
Laurent Gomila - SFML developer

vurentjie

  • Newbie
  • *
  • Posts: 31
    • View Profile
bitmask cursor
« Reply #2 on: June 29, 2008, 08:26:03 am »
cool thanks, i have been playing around with it and in any case might not choose such a thing after all, i have been doin exactly what you been saying above, and it is fairly easy to implement, i am goin to look through the graphics package as well because i haven't actually used and of the 2d features you offer, the main problem i had was detecting whether mouse has left the window,so will be lookin into that as well

sorry, this sounded like a cool idea, until i experimented more with it, i might just go look at the different cursor types already available and use those - for myself that is. :wink: