Resolution independence and button icons

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resolution independence and button icons

Post by Klaus »

Adrian wrote:But there's nowhere to specify a filename on a button icon ???
Nowhere!

As I wrote:
Yes, you need to set the image id, but it does not matter if that image has been imported or is referenced = its FILENAME set!
See screenshot...
Attachments
reference_image2.jpg
Adrian
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 79
Joined: Wed Jul 11, 2012 5:03 pm

Re: Resolution independence and button icons

Post by Adrian »

Ahhhh *slaps forehead*

So the button references an imported image which in turn references the filename.

Sorry it took you so long to get through my thick skull, but thank-you so much for patience and persistence.

Hopefully someone else will find this useful, too.

Cheers,

Adrian
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resolution independence and button icons

Post by Klaus »

Hi Adrian,
Adrian wrote:So the button references an imported image which in turn references the filename.
Almost :D

The button references any Livecode image object!
The image object itself can be internal/imported or referenced to a file on disk = the filename.

There is already a feature request to expand this technique (resolution independence via "filename" swapping)
to also work with IMPORTED images, but until then we need to use referenced images.

Best

Klaus
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Resolution independence and button icons

Post by Mag »

Klaus, I'm pretty sure you have also a solution to use an image as pattern, right? :oops:
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resolution independence and button icons

Post by Klaus »

Hi Mag,
Mag wrote:Klaus, I'm pretty sure you have also a solution to use an image as pattern, right? :oops:
sure, what is the question? 8)


Best

Klaus
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Resolution independence and button icons

Post by Mag »

To use an image as pattern for a control and that that image is influenced by the resolution independent system (natural,@2x, etc) :D
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resolution independence and button icons

Post by Klaus »

Never tried it, but should work the SAME as for buttons described above. 8)
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Resolution independence and button icons

Post by Mag »

Unfortunately it seems that doesn't work, see the attached image. The image switches to @2x, the pattern doesn't.
Attachments
test.png
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Resolution independence and button icons

Post by Mag »

The test stack...

You cannot make another post so soon after your last.
Attachments
test.zip
(5.3 KiB) Downloaded 330 times
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resolution independence and button icons

Post by Klaus »

Hi Mag,

sounds like a bug to me, please report it here:
http://quality.runrev.com

Thank you!


Best

Klaus
Post Reply