SFML community forums

General => SFML wiki => Topic started by: NoIdea on November 01, 2010, 11:19:35 am

Title: [tutorials] Cursor
Post by: NoIdea on November 01, 2010, 11:19:35 am
Hi, I've written a Cursor class, however there seem to be a problem with SFML's wiki :

The first part is in a whole block even when I make a new line. Why ? Can someone Edit that ?

I've tested the functions on linux, however, I didn't test the whole program (I haven't got linux). Would someone mind testing it ?

If anyone wants to make remarks (const correctness for example), ... do it.

Please tell me if there are any english mistakes (I'm not english).

The link is here (http://www.sfml-dev.org/wiki/en/tutoriels/cursor).
Title: [tutorials] Cursor
Post by: Laurent on November 01, 2010, 11:22:39 am
Maybe you should post the link to the article... ;)
Title: [tutorials] Cursor
Post by: NoIdea on November 01, 2010, 11:34:30 am
Done...
Title: [tutorials] Cursor
Post by: Laurent on November 01, 2010, 12:27:16 pm
You should use the <code cpp></code> tag to output clean C++ code.
Title: [tutorials] Cursor
Post by: NoIdea on November 01, 2010, 01:07:48 pm
Done, didn't see there was that option. Thanks. Still need someone to check if there are no errors for linux.
Title: [tutorials] Cursor
Post by: NoIdea on November 08, 2010, 07:41:01 pm
No remarks ?
Title: [tutorials] Cursor
Post by: TechRogue on March 14, 2011, 02:29:14 am
Hey NoIdea, I tested out your class today and had a few errors on Linux, but nothing too bad. I got it all worked out and posted the updated source in a revision. Here are my changes:


Changed this:
Code: [Select]
Display* Display;
 to this:
Code: [Select]
Display* display;

Changed this:
Code: [Select]
Cursor Cursor;
to this:
Code: [Select]
XID Cursor;

Changed the value of sf::StandardCursor::Normal from XC_normal to XC_left_ptr;
Added a missing #ifndef
Added a missing delete call in the Linux destructor.
Modified the example application to match the standard tutorial naming convention, and added App.Close() support.


I also made a few minor grammatical corrections but didn't spend too much time on that.

Cheers