>> 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.

Great ! I made it ;)

Mouse works now well for all items (MenuItem, VideoItem) ! So the 
navigation in the menu is done.

Thanks a lot.

But, i've now a problem with Buttons on ConfirmBox : I'm not able to 
obtain absolute position of the buttons : 'top' and 'left' are relative 
positions into the Container window.

I code a function to broadcast and sum the position from the parent to 
the children (ie : self.rect.top = self.top + parent.rect.top), but it 
doesn't work because of the other child of the container (Brothers and 
sisters of the button ;) ).

So any help is appreciated,

Kitof ;)


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to