Icon field

43 views
Skip to first unread message

Christopher Galtenberg

unread,
Mar 26, 2018, 3:42:25 PM3/26/18
to ViperCard Chat & Discussion
In button properties, how is the Icon field to be used?

https://www.dropbox.com/s/ivxat8iplduru5h/Screenshot%202018-03-26%2012.33.25.png?dl=0

I didn't locate anything in the docs. Would this be an Icon id? Are there a set of Icons already available?

Ben Fisher

unread,
Mar 27, 2018, 3:45:32 PM3/27/18
to Christopher Galtenberg, ViperCard Chat & Discussion
---- On Mon, 26 Mar 2018 12:42:25 -0700 Christopher Galtenberg <galte...@gmail.com> wrote ----
> In button properties, how is the Icon field to be used?
>
> https://www.dropbox.com/s/ivxat8iplduru5h/Screenshot%202018-03-26%2012.33.25.png?dl=0
>
> I didn't locate anything in the docs. Would this be an Icon id? Are there a set of Icons already available?
>

This is a good question, I agree that this should be improved.

Right now, yes, it's an icon id for a set of hard-coded icons similar to the set that shipped with HyperCard.

I soon want to add custom icon support, especially so that people can make custom sprites for games. I haven't written this yet because I was planning to first add transparency support. (Interestingly, HyperCard did support transparency, apparently each pixel on the card paint could be white, black, or transparent).

For custom icons, how about this approach internally: instead of saying
set the icon of cd btn 1 to 3
you could say
set the iconSourceCard of cd btn 1 to card "icons"
set the iconSourceRect of cd btn 1 to 0, 0, 32, 32

I'm still thinking of how I would show this in the UI. Maybe you could select a region of your drawing with the select tool, and hit Save into Icon... in one of the menus.

-Ben


Christopher Galtenberg

unread,
Mar 27, 2018, 5:35:03 PM3/27/18
to ViperCard Chat & Discussion
I actually discovered my issue. If the button isn't tall enough, the icon isn't shown. If you increase height, and have a value between 1-260 in the icon id field, you should see an icon (eg, icon id 1 should show an old style disk).

> Right now, yes, it's an icon id for a set of hard-coded icons similar to the set that shipped with HyperCard.

It might be nice to have doc with a table of icons and existing IDs available, or even a dedicated page where the icons can be seen and chosen.

> I soon want to add custom icon support, especially so that people can make custom sprites for games....

That sounds very fun. Will be great to see new Hy/ViperCard capabilities!

Christopher Galtenberg

unread,
Apr 1, 2018, 7:42:39 PM4/1/18
to ViperCard Chat & Discussion

quix...@gmail.com

unread,
Nov 5, 2018, 1:29:39 PM11/5/18
to ViperCard Chat & Discussion
I was curious about the change of default icons as well. I didn't see this in here and actually sent a tweet about it. Is this feature still a WIP or a donation tier? I would love to see this feature implemented to be able to work more with sprites. I have been working on re-creating a game I made back when I was 11 (1993 feels so long ago now.)
Reply all
Reply to author
Forward
0 new messages