Based on your second question you probably already worked out that the default pointer images are in ENVARC:Sys/def_#?_pointer.info . I'll Just stated it explictly for anyone else reading ths thread who doesn't know.
Quote:
Why does the Icon Editor not save correctly?!
It does, it's just that it's definition of "correct" predates 32colour icons.
Use an image editor with 32bit support (I receomend SketchBlock )
Quote:
Can someone make a working white (not black) version of:
def_textpointer.info
You don't need and in fact I would recomend against using an icon for you custom pointers. Use images instead (see TBIMAGES:#?cursor)
If you felt really clever you could split the cursor and shadow parts of the alpha channels and build your own in memory with custom colours for cursor and shadow to match any colour theme the user micght choose.
You can't use PNGs directly like you can with everything else (gadgets, menus, toolbars).
You have to load them yourself with a datatype. Quote:
It has to be a generic bitmap.
Er no it's 32bit ARGB data not a bitmap. That is what you extract from the icon.
// POINTERA_BitMap, fallbackPointer,
You *must* provide this it cannot be commented out. Or the object wont be created
Quote:
POINTERA_ImageData (uint32 *) (V52) Pointer to image data to reference pointer imagery from. The format of the image data is direct mapped ARGB true color.
The total number of bytes in the block of data must be POINTERA_Width * POINTERA_Height * sizeof(uint32).
Note that POINTERA_BitMap, POINTERA_WordWidth, POINTERA_XResolution and POINTERA_XResolution are still required to store a backup image in case the destination hardware cannot display true color pointers.
If no POINTERA_BitMap is provided the default pointer will be used and the POINTERA_ImageData will be ignored.
static struct BitMap fallback=
{ 2,16,0,2,0,{(PLANEPTR)handdata,(PLANEPTR)(handdata+16)}
};
/* Load and add a pointerclass application to the available list */
LONG AddApplicationPointer(struct SketchApp *skapp, STRPTR tbimage, WORD hotX, WORD hotY, STRPTR name)
{
LONG result = -1;
struct SketchMousePointer * smp = NULL;
if((smp = Allocmem(sizeof(struct SketchMousePointer),MEMF_PRIVATE | MEMF_CLEAR)))
{
Object *dto = IDataTypes->NewDTObject(tbimage,
DTA_SourceType,DTST_FILE,
DTA_GroupID,GID_PICTURE,
PDTA_DestMode,PMODE_V43,
TAG_DONE);
OK. I got icons to load. It was the lack of the fallback image.
Trying your code for images (I was taking it too far and making a NewObject(BitMapClass, and trying to use that) but I don't know where you are getting sizeof(ARGB32).
Workbench Explorer - A better way to browse drawers