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

Author Topic: [tutorials] Cursor  (Read 7363 times)

0 Members and 1 Guest are viewing this topic.

NoIdea

  • Full Member
  • ***
  • Posts: 149
    • View Profile
[tutorials] Cursor
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[tutorials] Cursor
« Reply #1 on: November 01, 2010, 11:22:39 am »
Maybe you should post the link to the article... ;)
Laurent Gomila - SFML developer

NoIdea

  • Full Member
  • ***
  • Posts: 149
    • View Profile
[tutorials] Cursor
« Reply #2 on: November 01, 2010, 11:34:30 am »
Done...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[tutorials] Cursor
« Reply #3 on: November 01, 2010, 12:27:16 pm »
You should use the <code cpp></code> tag to output clean C++ code.
Laurent Gomila - SFML developer

NoIdea

  • Full Member
  • ***
  • Posts: 149
    • View Profile
[tutorials] Cursor
« Reply #4 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.

NoIdea

  • Full Member
  • ***
  • Posts: 149
    • View Profile
[tutorials] Cursor
« Reply #5 on: November 08, 2010, 07:41:01 pm »
No remarks ?

TechRogue

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
[tutorials] Cursor
« Reply #6 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

 

anything