SOLVED - How do you load custom icons?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
admin12
Posts: 412
Joined: Wed May 11, 2011 9:47 am

SOLVED - How do you load custom icons?

Post by admin12 » Thu Aug 11, 2011 2:03 am

I bought the Omega bundle and that came with quite a few icons, some of which I now need. I read the included instructions and they do not tell you where to put the icons. I want them to show up in the property inspector under colors and patterns, but I see no way to load external icon sets.

How does one do this?

Mike
Last edited by admin12 on Thu Aug 11, 2011 7:41 pm, edited 1 time in total.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: How do you load custom icons?

Post by jacque » Thu Aug 11, 2011 5:21 am

Icons are just image IDs. To use a single icon, you can just import the image and script it, without bothering with a button.

To use the image as an actual button icon, import it, note its ID, hide it, and assign the button's icon to that ID. If the image is anywhere in the stack, it will also show up in the button's property inspector when you click the Icon selector. Choose "this stack" as the library to get the icon from in that case.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

admin12
Posts: 412
Joined: Wed May 11, 2011 9:47 am

Re: How do you load custom icons?

Post by admin12 » Thu Aug 11, 2011 3:32 pm

Right. I am aware of the import as control function. However, my question was - how do I install icons so they show up under the drop down in colors & patterns (there is a dropdown if you click the 21st square to the left - it brings up a texture/graphic chooser and there is a drop down for other installed icon sets. How do I install icon sets there?

Mike

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: How do you load custom icons?

Post by jacque » Thu Aug 11, 2011 4:59 pm

I don't have 21 squares in there, but I get your meaning. You want the texture picker to show the icons. The advice hasn't changed -- import the icon to your stack, and when you bring up the texture picker it will appear in the dropdown when you select "this stack".

You may be asking how to install all the icons at once into the texture picker (which will also show them in the icon picker.) For that you need to create a custom image library and put it into your LiveCode Resources/Icons folder. I don't have the icon stack you're working with, so I can't check, but an image library must have all the images on a single card. If your purchased icon set isn't set up that way you'll need to create a stack, or edit the existing one, so it is.

Once you have a stack with all the icons on a single card, rename it to start with "revLib". Place it into the Resources/Icons folder inside your My LiveCode folder (generally in Documents unless you've customized the location.) Restart LiveCode and the icons should appear in the image library. The image library is used for both icon picks and image/texture picks.

One easy way to see what's required is to create a new library from within the image picker and add a single image. Then go look in the Resources folder to see the new stack and how it is named.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

admin12
Posts: 412
Joined: Wed May 11, 2011 9:47 am

Re: How do you load custom icons?

Post by admin12 » Thu Aug 11, 2011 7:41 pm

jacque wrote:I don't have 21 squares in there, but I get your meaning. You want the texture picker to show the icons. The advice hasn't changed -- import the icon to your stack, and when you bring up the texture picker it will appear in the dropdown when you select "this stack".

You may be asking how to install all the icons at once into the texture picker (which will also show them in the icon picker.) For that you need to create a custom image library and put it into your LiveCode Resources/Icons folder. I don't have the icon stack you're working with, so I can't check, but an image library must have all the images on a single card. If your purchased icon set isn't set up that way you'll need to create a stack, or edit the existing one, so it is.

Once you have a stack with all the icons on a single card, rename it to start with "revLib". Place it into the Resources/Icons folder inside your My LiveCode folder (generally in Documents unless you've customized the location.) Restart LiveCode and the icons should appear in the image library. The image library is used for both icon picks and image/texture picks.

One easy way to see what's required is to create a new library from within the image picker and add a single image. Then go look in the Resources folder to see the new stack and how it is named.
Thank you. That was the advise I was looking for.

Mike

Post Reply