Hover and Leave are great for testing the mouse for collision, what
I'm wondering about is testing just some arbitrary point for
collision.

I know our elements have top, left, width, height (curiously the
Shoes::Image element lacks this?) but I'm thinking along the lines of
hit detection against the non-transparent parts of an element. :)  For
a flow, that would means space not covered by children would not hit
detect. Ideally for art or text or images with transparency, the parts
you can see through would not hit detect.

I'm building a simple race game and it's just everything would be so
much easier if the track were just an image with transparency where
it's OK to drive :)    Culling together a huge data structure
describing the boundaries of a track will be a bummer, but I suppose
that's what will be needed.

See, my point is the idea is fairly awexome, and for every fairly
awexome idea there's about a 40% likelyhood that you implemented it
already and forgot to document. ;)

Thanks!

- - Jesse

On Jan 25, 2008 1:26 PM, why the lucky stiff <[EMAIL PROTECTED]> wrote:
> On Thu, Jan 24, 2008 at 11:39:52PM -0800, Jesse Thompson wrote:
> > I wonder if you can query if a point is covered by another object, for
> > example, if it's inside or outside the mask?
>
> Most elements in Shoes have `top`, `left`, `width` and `height`
> methods which reflect the actual position of that element.
>
> You can also attach event methods to most elements, though I just
> tested with masks and it looks like it's missing some events.
> Ideally, you should be able to attach `hover` and `leave` methods to
> masks.
>
> Some kind of hit test method would be nice, though, sure yeah.
>
> _why
>

Reply via email to