bigger cursors
Trevor DeVore
lists at mangomultimedia.com
Tue Nov 23 12:23:05 EST 2004
On Nov 23, 2004, at 8:48 AM, Troy Rollins wrote:
> On Nov 23, 2004, at 11:31 AM, Richard Gaskin wrote:
>
>> I had thought that Director's large "cursors" were simply images that
>> follow the mouse, something that could be done with a mouseMove
>> handler in Rev, no?
>
> This is *mostly* the case. Director has somewhat better support for
> actually replacing the hardware "cursor" than Rev does, but when it
> comes to cursors larger than the OS is intended to support, then it is
> the old "hide the cursor and move an image with the mouseLoc" just
> like pretty much everything else does.
I brought subject this up because I was running into problems when
trying to use the drag event handlers (dragEnter, dragMove, etc.) when
dragging and dropping within my own Revolution application.
When doing drag and drop within a field I've used the floating palette
method that appears, follows the mouse and disappears when done.
When dragging from one field to another I wanted to use the
dragEnter/dragLeave handlers to handle visual cues of fields that the
user could drop data on. The problem is that you can't get a palette
to follow the pointer between Revolution windows this way. Setting the
cursor to the image you want to use would solve this problem but
cursors are limited in size. So it seems that these handlers are best
used when dealing with drag/drop between applications.
So to sum up, here is how I *think* this all works:
Drag and Drop within your own Application -
Set a custom cursor if it can fit within the cursor size constraints.
Use a palette with an image that follows the pointer around with
mouseMove when needed. Make palette transparent for extra fun. Visual
feedback is handled with mouseEnter/mouseLeave and some sort of global
or custom property that determines what type of data you are dragging.
Between applications -
Use drag events. Set a custom cursor for visual feedback.
If anyone has any additional insight then please share. Perhaps this
was obvious to others but I haven't worked with drag and drop before so
it wasn't for me.
--
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com
More information about the use-livecode
mailing list