Creating & Using a Custom Cursor?

Sarah sarahr at genesearch.com.au
Tue Jan 28 21:31:00 EST 2003


I found that the colors had to be quite specific. You need an image 
that uses three colors: pure black, pure white and something different. 
Draw the cursor in a 16 x 16 image, using black AND white and then fill 
the background with color 3 and make it transparent. It might be easier 
if you import one of Rev's cursors from the image library, then trying 
altering it rather than creating your own from scratch.

Cheers,
Sarah

On Tuesday, January 28, 2003, at 07:23  am, Barry Levine wrote:

> I need to set the cursor to a custom image and keep it persistent. How 
> do I do this? Here is what I've tried so far:
>
> I used iDraw to create a 16x16 image and saved it as a ".png" with 
> "transparency". Then I created an image object within Rev, set it to 
> 16x16, and set the reference to the image I saved. Then I used the 
> Image Library and, with the image object selected, I clicked the "Move 
> selected image into this library. Finally I used the code:
>
>   set the lockcursor to true
>   set the cursor to id 1069 -- the id of my 16x16 image
>
> Okay, this worked but the cursor is white. Not a solid white, but the 
> black lines I created in iDraw (and which appear black in the image 
> object) are white as the cursor. I do have a grey background graphic 
> in the stack; would this be causing the cursor to appear white 
> (against this grey background)?
>
> The Rev docs are pretty vague on custom cursors. Speaking of which, I 
> do see a "Custom Cursors" area in the Image Library. This is, I 
> assume, the repository of custom cursors which is available to all Rev 
> stacks?
>
> So, in addition to my questions above, let's add these:
>
> 1. Can I add my custom cursor to my stack by another method? (Details, 
> please.)
>
> 2. I don't want the image object containing the cursor picture 
> appearing anywhere in my app (just the cursor itself when I call it). 
> Can I delete the image object or do I need to keep it (but make the 
> object invisible)? I suspect I need to keep it as the image ID is 
> being referenced. I'd rather have it as an internal object (which 
> probably moves us back to the previous question).
>
> I have used ResEdit but never for cursor creation or management. 
> Perhaps this is the method?
>
> Thanks in advance for any assistance.
>
> Regards,
> Barry
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>





More information about the use-livecode mailing list