Results 1 to 6 of 6

Thread: SDL.pas missing windowing events?!?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    @SilverWarior: Thanks for the info, I am not going to use SDL 1.3 at this time so I will think of an other way
    @Stoney: Ok, I will take a look at that site...thanks for the info

    EDIT: hmm...I think I might have just thought of a way around my issue, but I need to test it first
    I am going to test the mouse position each frame and if it is within a small border around the screen, then I will not render the cursor.
    If that doesn't work, I will try the SDL_APPMOUSEMOCUS way and see how that goes..

    cheers,
    Paul
    Last edited by paul_nicholls; 01-01-2012 at 02:11 AM. Reason: type

  2. #2
    Quote Originally Posted by paul_nicholls View Post
    hmm...I think I might have just thought of a way around my issue, but I need to test it first
    I am going to test the mouse position each frame and if it is within a small border around the screen, then I will not render the cursor.
    If that doesn't work, I will try the SDL_APPMOUSEMOCUS way and see how that goes..
    Ok, that works, but not if I move the mouse too fast...and it looks strange with the mouse appearing/disappearing with the border test

    I will try the SDL_APPMOUSEMOCUS​ now then

  3. #3
    Quote Originally Posted by paul_nicholls View Post
    hmm...I think I might have just thought of a way around my issue, but I need to test it first
    I am going to test the mouse position each frame and if it is within a small border around the screen, then I will not render the cursor
    If you are testing the mouse position every frame you could simply check whether it's position is over your window instead just for smal border.

    Another idea: When creating your SDL window do you have an option to set default cursor type for it. In windows each window can have it's default cursor type set. This causes mouse cursor to automaticly change as soon as the mouse cursor moves over that window. If you can then you can just set your SDL window's default curspor type to crNone and then programaticly check what is the current cursor type each frame. So when mouse cursor type is set to crNone you know that the mouse cursor is over your window and you need to render your ingame cursor, if mouse cursor is set to anything else then it probably isn't over your window so no ingame cursor renderning is requred.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •