Set the Opacity of a Button Background

RM richmondmathewson at gmail.com
Tue Mar 1 14:36:09 EST 2016


Here's a demo of what I just wrote:

https://www.dropbox.com/s/63u8h6sb0gk2yjo/Button%20Games.livecode.zip?dl=0

Richmond.

On 1.03.2016 21:25, Sannyasin Brahmanathaswami wrote:
> We looking at very simple button design:
>
> 1)  Border color is on/white/2px
> 2)  background is set to clear (no color assignment and no icon)
> 3)  background opacity set to 50% # if we can figure out how....
> 4)  Button name/label white
>
> Now... I realize that if # 2 above is true, then possibly, since there are no pixels at all in the background that the algorithm might not be possible from a video card point of view... so we *could* set the background to white and set the opacity to a grayscale?transparency value of say... 50%  but the idea is that the text of the button name/label remains fully, 100% opaque, even thought background has an alpha channel value (some level of transparency)
>
>  From my fiddling... (I could be missing something) this is not possible either with buttons of fields  or graphics.
>
> The use case is, again, as discussed in another thread: we want visibility of the text on top of *any* image to be visible. We do this in print all the time... but we cannot separate the blending of the text label or text itself and the background of a button/field in LC... at least I have not found a way.
>
>
>
>
>
> On March 1, 2016 at 9:15:36 AM, RM (richmondmathewson at gmail.com<mailto:richmondmathewson at gmail.com>) wrote:
>
> Do you mean that you want a button where an icon/image is set at 100%
> opacity and the rest of
> the button to, say, 50% transparency?
>
> Would be grateful if you could clarify this.
>
> Richmond.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list