Path: utzoo!utgpu!watmath!att!dptg!rutgers!usc!orion.cf.uci.edu!uci-ics!nagel
From: nagel@paris.ics.uci.edu (Mark Nagel)
Newsgroups: comp.sys.mac.hypercard
Subject: Re: how to make arbitrary-shaped buttons?
Keywords: buttons, fields, buffer, madonna-please-marry-me
Message-ID: <21019@paris.ics.uci.edu>
Date: 15 Aug 89 16:50:07 GMT
References: <2594@laidbak.UUCP> <7505@ecsvax.UUCP>
Organization: University of California, Irvine - Dept of ICS
Lines: 24

dlugose@ecsvax.UUCP (Dan Dlugose) writes:

>   You can use a rectangular button that encloses your region, and on
>mouseup compare the clickloc to the region you have in mind.  Since
>HyperTalk processes quite slowly, for irregular regions, you might
>want an external function to define the regions and whether a point
>is within them.

Also, if it is appropriate, you could use the 'thePixel' XFCN
available in various XFCN collections to determine if the pixel
under the clickLoc is black.  This may not work for all such
regions, but I'd think in general, the combination of this with
other 'point is within' type expressions would work quite well.

For example, I like to use the "double arrow"-type buttons sometimes
(like the ones from the General cdev for changing the current
time).  You can use a single button for this "control" and check
first to see which half of the button was clicked and then whether
the pixel at the clickLoc is black.  This requires that the user
press only in the arrow part.
-- 
Mark Nagel
UC Irvine, Department of Information and Computer Science
ARPA: nagel@ics.uci.edu         UUCP: ucbvax!ucivax!nagel