Changing SCSIFS icons
Andrew Conroy (370) 740 posts |
On the Iyonix, I can change the icon for SCSI drive :0 with the following bit of code:
IF FNtaskname(icon%)="SCSI Filer" THEN wimp%!4=icon% SYS "Wimp_GetIconState",,wimp% icontext$=FNstring(wimp%!(8+20)) iconname$=FNstring(wimp%!(8+20+4)) IF iconname$="Sfloppyscsi" AND icontext$=":0" THEN SYS "Wimp_GetIconState",,wimp% $wimp%!(8+20+4)="Smyicon"+CHR$0 wimp%!8=0 wimp%!12=0 SYS "Wimp_SetIconState",,wimp% ENDIF ENDIF and the icon stays changed for the duration. However, on the BeagleBoard, I get an Abort on Data Transfer at the $wimp%!(8+20+4)=”Smyicon”+CHR$0 line. Any ideas why this might be? Also, it seems (on the Iyonix anyway), that the name of the icon determines the position on the iconbar. If I’ve changed the icon and then unplug the device and replug it, it will move from the right of Apps to the left of Apps! |
Andrew Conroy (370) 740 posts |
Argh, can’t work out how to get the formatting right to display the code fragment :-( |
Trevor Johnson (329) 1645 posts |
My previous mucking around may possibly be of some help with your formatting headache, depending what the issues are. Good luck, or you could always just link to somewhere where it can be rendered as you intend! |
Andrew Conroy (370) 740 posts |
Thanks, that’s fixed it (see above). Just wish the actual problem was as easy to solve as the formatting. |
Trevor Johnson (329) 1645 posts |
Hopefully you’ll read here later from someone that it is! |
Jeffrey Lee (213) 6048 posts |
My knowledge of the $... syntax isn’t great, but doesn’t it cause BASIC to write the string into the memory pointed to by
How did you get the icon to appear on the right of Apps in the first place? Doesn’t it always appear to the left? Also, it looks like SCSIFiler (and ADFSFiler, since they share the same source) looks at the first character of the sprite name to work out whether it’s creating an icon for a floppy disc or hard disc, and then takes the appropriate action with regards to setting the icon name to the disc name and selecting an icon priority. So although I’m not sure how it could jump from the right side of Apps to the left, it will certainly make the icon appear in the wrong place (and with the disc name underneath, if you’re lucky!) |
Andrew Conroy (370) 740 posts |
Ah, of course! I’d forgotten that SCSIFS was soft-loaded on the Iyonix! Thanks.
Oops, my mistake, I meant ‘Discs’ not ‘Apps’! Removable storage appears to the right hand side of the discs icons, whereas fixed storage appears on the left side.
Ok, so if I named my replacement sprites with the same first letter I’d get away with not changing the priority, on the Iyonix at least. Back to the drawing board! |
nemo (145) 2546 posts |
In the various Filers I’ve customised I made them use (well, try) different sprites for each of the drives. So ADFSFiler tries harddisc5 first, then harddisc if it can’t find that. Actually, they also check sharing so they actually try sharddisc5 then harddisc5 then sharddisc then harddisc. I have my drive icons different colours. Makes them much easier to tell apart. And the little red light turns green when shared. (RO3 style icons, obviously) |