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: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resolution independence and button icons

Post by Klaus » Tue Dec 03, 2013 5:44 pm

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 » Tue Dec 03, 2013 5:48 pm

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: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resolution independence and button icons

Post by Klaus » Tue Dec 03, 2013 5:57 pm

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 » Fri Dec 06, 2013 10:18 pm

Klaus, I'm pretty sure you have also a solution to use an image as pattern, right? :oops:

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

Re: Resolution independence and button icons

Post by Klaus » Sun Dec 08, 2013 5:02 pm

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 » Sun Dec 08, 2013 8:41 pm

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: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resolution independence and button icons

Post by Klaus » Sun Dec 08, 2013 9:59 pm

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 » Tue Dec 10, 2013 3:47 pm

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 » Tue Dec 10, 2013 3:48 pm

The test stack...

You cannot make another post so soon after your last.
Attachments
test.zip
(5.3 KiB) Downloaded 238 times

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

Re: Resolution independence and button icons

Post by Klaus » Tue Dec 10, 2013 3:50 pm

Hi Mag,

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

Thank you!


Best

Klaus

Post Reply