Kitof wrote:
> Hi all,
> 
> I've some time and motivation these days to improve the mouse support on 
> freevo. I found some trace of a sdl mouse support in history of the 
> trunk, but apparently it "never works as it should".
> 
> So I try to apply the same kind of support on the latest 1.x release, 
> but I'm not able to find a way to code a function like "get_widget_at".
> 
> So, my question is : What's the cleanest way to obtain the widget at a 
> given position ?

I was looking at this a bit, pygame has a Rect class that can report if 
a mouse is over the rect. So if all 'clickable' widgets have a rect 
member function then it should be possible to determine which has been 
clicked.

In src/main.py you can see a line of code that prints the pygame events:
_debug_('pygame event=%s' % (event), 2)

> 
> Thanks in advance, and sorry for my strange english ;)

No problem :)

HTH a bit
Duncan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to