Detecting if cursor is outside the window

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
leiradel
Party member
Posts: 184
Joined: Thu Mar 11, 2010 3:40 am
Location: Lisbon, Portugal

Re: Detecting if cursor is outside the window

Post by leiradel »

SDL knows when the mouse enters and leaves the window via the SDL_ActiveEvent event, so it's just a matter of implementing love.mouseentered and love.mouseexited callbacks.

I could try and make a patch but on MinGW fails on ./configure on Windows because of it misses the OpenGL library which actually exists in my lib directory (LÖVE 0.7.0 beta.)

Cheers,

Andre

EDIT: Hum, 0.7.0 beta already has an event for gaining/losing focus... FAIL :death:
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Detecting if cursor is outside the window

Post by zac352 »

giniu wrote:
zac352 wrote:There should really be an actual way to change the cursor.
sdl 1.3 probably supports changing system cursor, but it's only b&w and still, animated and colour cursors are on wishlist, and not on required features for 1.3/2.0. So I doubt there will be any cross-platform way to change cursor anytime soon, unless someone who needs it will implement this feature - do I see volunteer? :P
I have no prior experience with SDL, and I have a tendency to make more errors than lines of code. :roll:
Hello, I am not dead.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Detecting if cursor is outside the window

Post by Robin »

zac352 wrote:I have no prior experience with SDL, and I have a tendency to make more errors than lines of code. :roll:
Practice, my friend. Practice. :monocle:
Help us help you: attach a .love.
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Detecting if cursor is outside the window

Post by zac352 »

Robin wrote:
zac352 wrote:I have no prior experience with SDL, and I have a tendency to make more errors than lines of code. :roll:
Practice, my friend. Practice. :monocle:
I guess I could use some more knowledge than some crappy tutorial.
*sigh*
I wish I was living in a country with a real education system. >_>
Hello, I am not dead.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests