Page 1 of 1

cicn problem

PostPosted: Tue Jun 09, 2009 5:11 am
by teorema67
Hello

My old ResEdit cicns are displayed correctly in a SC45 project.

Every new cicn designed in Rezilla1.1 (don't have Classic any more) and every old cicn changed in Rezilla
- is correctly displayed in the Resource Manager of SC41 and in the mpi's Resource module (upper icon)
- is not correctly displayed in the Resource Manager of SC46 and in the SC45 project itself (lower icon):

Picture 3.png
Picture 3.png (4.84 KB) Viewed 440 times

My hope was that mpi will solve the problem, but it doesn't since in the SC45 project the cicns are wrong.

How could i produce new cicns that work with SC46, any idea?

Thanks!
Andreas

Re: cicn problem

PostPosted: Tue Jun 09, 2009 5:16 am
by Joe Koomen
I'm not sure this is right, but I seem to recall that you need to assign a resource number to each cicn. I think they all need to be higher than 128, but you might want to make them significantly higher to avoid duplicating numbers used in the resource browser.

Re: cicn problem

PostPosted: Tue Jun 09, 2009 5:25 am
by Stephane Leys
teorema67 wrote:My hope was that mpi will solve the problem, but it doesn't since in the SC45 project the cicns are wrong.


In which type of button do you put the icon ?
Send me a simple project with the icon and the button where you put it, I'll look at it.

S.

Re: cicn problem

PostPosted: Tue Jun 09, 2009 5:26 am
by teorema67
Hello Joe

Thanks for answering! I did pay attention to not get resource number conflicts. Anyway, the cicn change by Rezilla did keep its original id and there was no 2nd resource with the same number.

Cheers
Andreas

Re: cicn problem

PostPosted: Tue Jun 09, 2009 5:28 am
by Stephane Leys
Stephane Leys wrote:Send me a simple project with the icon and the button where you put it, I'll look at it.


PS : Send me also the original file of your icon, the one you open in Rezilla

S.

Re: cicn problem

PostPosted: Tue Jun 09, 2009 5:46 am
by teorema67
Hello Stéphane

I think you brougt me to the right way.

Bevel on the left and rectangel button on the right in a SC46 dummy proj:

Picture 4.png
Picture 4.png (6.32 KB) Viewed 417 times

SC46's Resource Manager still shows the icon distorted, but the bevel button is right!

Thanks a lot!
Andreas

Re: cicn problem

PostPosted: Tue Jun 09, 2009 5:58 am
by Stephane Leys
teorema67 wrote:I think you brougt me to the right way.

Bevel on the left and rectangel button on the right in a SC46 dummy proj:

Picture 4.png

SC46's Resource Manager still shows the icon distorted, but the bevel button is right!


In MPI, setting the icon of a button is not done the same way for all button types. For rectangle and polygon, it is done by the SC built-in icon picker, for other buttons, it is done by the scripted MPI icon picker (which is roughly the same as the RTE icon picker).
Is the icon distorted in MPI's resource module too ?

S.

Re: cicn problem

PostPosted: Tue Jun 09, 2009 6:03 am
by Stephane Leys
Stephane Leys wrote:Is the icon distorted in MPI's resource module too ?

Well, you already said that it isn't.
I was thinking of the icon picker.

In MPI , you access the icon picker by selecting the button with the pointer tool and selecting "icon" in the popup menu of the PI.
I would be interested to know how your icon looks in the icon pickers, for rectangle and bevel buttons.

S.

Re: cicn problem

PostPosted: Tue Jun 09, 2009 6:19 am
by teorema67
... and the fact remains, that the "old" cicns are displayed correctly in bevels and rectangles.

That's the mpi's icon picker of the bevel button:

Picture 5.png
Picture 5.png (52.21 KB) Viewed 402 times

Re: cicn problem

PostPosted: Tue Jun 09, 2009 6:19 am
by teorema67
... and that's the icon picker of the rectangle button:

Picture 6.png
Picture 6.png (38.84 KB) Viewed 400 times

Re: cicn problem

PostPosted: Tue Jun 09, 2009 6:25 am
by Stephane Leys
teorema67 wrote:That's the mpi's icon picker of the bevel button:


I think that there is a problem in your icon.
Could you send it to me (the rezilla file) or post it in the files forum ?

S.

Re: cicn problem

PostPosted: Tue Jun 09, 2009 1:23 pm
by lthompson
FWIW, I see this issue frequently -- cicn icons (made/edited with Rezilla) on rectangle buttons get distorted just like in Andreas's screenshots. So the problem is not specific to MPI.

Re: cicn problem

PostPosted: Wed Jun 10, 2009 3:41 am
by teorema67
Hello Lisa

Yes, something with the Rezilla cicns and/or SC 4.6 must be wrong, was also the result of my e-mail discussion with Stéphane.

Here are 2 samples. The first screenshot is a SC41 proj, bevels on the left, rects on the right, upper row with ResEdit-cicns, lower row with Rezilla cicns:

Re: cicn problem

PostPosted: Wed Jun 10, 2009 3:43 am
by teorema67
And now the same for a SC46 proj:
Picture 1.png
Picture 1.png (39.57 KB) Viewed 358 times

Only the Rezilla cicn only in a rect button only on SC 4.6 is distorted.
Edit: And Stéphane told me that the problem occurs only on Intels.

Do you know another cicn editor as Rezilla for OS X?

Thanks!
Andreas

Re: cicn problem

PostPosted: Wed Jun 10, 2009 7:15 am
by Stephane Leys
teorema67 wrote:Only the Rezilla cicn only in a rect button only on SC 4.6 is distorted.

In the bitmap editors preferences of Rezilla, there is an option for using 8 bits colors instead of the default 32. I would try that since SC colors (fillfore ...) are limited to 256 colors. I wouldn't be surprised if rect buttons was limited to these colors.
OTOH bevel buttons are drawn by the OS which doesn't have this limitation.

S.

Re: cicn problem

PostPosted: Wed Jun 10, 2009 9:41 am
by teorema67
Hy Stéphane

Thanks for your answer! I tried with that option, but it doesn't change the distorted icons when saved with Rezilla. On the other hand, also with the 8 bit option off, Rezilla purposes only 256 colors in the cicn editor.

Cheers
Andreas

Re: cicn problem

PostPosted: Wed Jun 10, 2009 2:58 pm
by lthompson
teorema67 wrote:Do you know another cicn editor as Rezilla for OS X?

I don't know of any. This has been asked on the list now and again and I don't think there are any free or cheap resource editors available any more. If you search Version Tracker, I think you'll find at least one that's like >$100 or something, but I don't remember.

I'm kind of hoping that the next version of SC does away with resources, and we can just put TIFF's in the app bundle to use as UI icons the way other Mac apps do.

Re: cicn problem

PostPosted: Wed Jun 10, 2009 6:24 pm
by Mike Yenco
Just wanted to mention that SuperCard can use icns in the button rectangle tool and such buttons can have showFill/showPen set to false so you just get the icon itself (which can be positioned over other controls or elements if you wish). You get nice modern, smooth, anti-aliased icons that way that look really great compared to cicn. The icns resources can be imported into the data fork of the project to be used... OR... Xtend includes externals which let you set an iconData userProperty from a variety of sources... such as a file with a pasted icon... an .icns file... etc.

So you can actually build a SuperCard-based app today that doesn't require icon "resources" and use the externals to just put .icns files in the app bundle to use as UI icons the way other Mac apps do. :)

Re: cicn problem

PostPosted: Wed Jun 10, 2009 9:48 pm
by lthompson
Mike Yenco wrote:Just wanted to mention that SuperCard can use icns in the button rectangle tool and such buttons can have showFill/showPen set to false so you just get the icon itself (which can be positioned over other controls or elements if you wish). You get nice modern, smooth, anti-aliased icons that way that look really great compared to cicn.

That depends on the image you're starting with -- icns is definitely the way to go if you have nice-sized images that scale well (or you have the talent to modify/create your own). But given an image that's as small as the one in Andreas's screenshots, where you just want it to appear as-is on a button of a particular size, I don't think it would be a good idea to use the icns format, because icns icons are automatically scaled with button size (unlike cicn icons) and an icon that small is not going to scale well.

Re: cicn problem

PostPosted: Thu Jun 11, 2009 7:40 am
by Mike Yenco
There is no reason an .icns file can't be created that ONLY contains a smaller size. I have several .icns resources I've put into the data fork of my current apps that are ONLY 16 x 16 or 32 x 32. In fact, if you are looking to just use an icon at a small size it is better to use one at that size rather than finding "nice-sized images that scale well". Especially at smaller sizes, the quality is better that way and you also save a LOT of room by not having 128 x 128 icons that you are not going to display at that size in the interface anyways.

Yes, one does have to be careful about sizing a button so the icon is displayed at the proper size... 24 x 24 for a button just displaying a 16 x 16 icon. 40 x 40 for a button just displaying a 32 x 32 icon. Make the button so the showFill/showPen is false and you can put it on top of another button if you wish that can be any size. Only the icon itself (not the button bounds) responds to the click with this setup. You could easily script the icon button to send a mouseUp, etc. to the button below it and then script the lower button to perform whatever action.

The other advantages of .icns related to this thread are that it is rather easy to find editors out there (vs. cicn) since .icns is a modern format and cicn is a thing of the past, and AFAIK there are no display issues with .icns like there can be with cicn in SuperCard. Oh, and as I mentioned, .icns generally look better... although, you could just copy and paste a cicn into an .icns editor and have that retro look if you desired as well :)

Re: cicn problem

PostPosted: Thu Jun 11, 2009 8:11 am
by teorema67
lthompson wrote:
teorema67 wrote:...If you search Version Tracker, I think you'll find at least one that's like >$100 or something, but I don't remember...


Hello Lisa, AFAIK not even Resorcerer ($256) owns a cicn editor.

Hello Mike, thanks for that information. I'm familiar with Iconographer and I'll give a try to .icns icons in the future, because I'll have to create new ones. In contrast my cicns are ready for use now.

Cheers
Andreas

Re: cicn problem

PostPosted: Thu Jun 11, 2009 12:52 pm
by lthompson
Mike Yenco wrote:Yes, one does have to be careful about sizing a button so the icon is displayed at the proper size... 24 x 24 for a button just displaying a 16 x 16 icon. 40 x 40 for a button just displaying a 32 x 32 icon...

That's all I was trying to point out, for benefit of people who might read the post and try to change all their cicn's to icns's only to find out that they don't look right. If you have, for instance, a 22x22 image and you want to use it as an icon on, say, a 28x28 bevel button, you can put it in a 32x32 cicn resource and have it appear at its original size. But if you put it in the 32x32 member of an icns icon, it is not going to appear on the button at its original size, it'll be scaled and probably look terrible. I just don't see an advantage to overlaying buttons on buttons (you'd have to script the highlighting of the underlying button) when cicn is a perfectly viable option -- small grayscale images aren't going to look any better as icns than as cicn. Plus you can't overlay larger buttons on small buttons if you have several small buttons in close proximity:

Image

Mike, several years ago I tried to use icns icons with the images and buttons pictured above, following advice I received on the SC list. It was a lot of aggravation and not getting the results I wanted. I made a whole study of how cicn and icns icons behave on buttons of different types, and I stand by my conclusion that icns icons are not the right choice in every case. Incidentally, much of what I learned in my "study" went into my Icon Tool Sample Project.

Re: cicn problem

PostPosted: Thu Jun 11, 2009 2:02 pm
by Mike Yenco
True, but at that size there are things that can still be done, such as making the entire button an icon. That's what I did in my projects. So things like:

Image

Image

Image

are all just a series of 32 x 32 icons (even though the image of the buttons themselves do not take up that full space) in a 40 x 40 rectangle button (to maintain the actual icon size) with the showFill/showPen set to false (so only the icon itself is clickable as a "button").

I suppose I could have used pictureData with alpha masks, but I find the .icns easier to manage. And for simple click "buttons" I just use the autoHilite which works quite well. For disabled states... autodim or disable works well. For sticky "buttons" I just swap out one icns ID of an "up" state for another with a "down" state.

Using icons for the buttons also provides the flexibility to use button styles that SuperCard does not (yet) offer. Such as the square "glass" buttons, or the gradient metal buttons, but it would be just as easy (if not easier) to take a picture of an empty bevel button as a starting point.

Re: cicn problem

PostPosted: Thu Jun 11, 2009 2:20 pm
by lthompson
That's great, Mike. I just don't usually regard changing the look of someone's project as within the scope of their original question.