Solved add opacity function
#1
Hello

Is it possible to add a line of code that can handle the opacity of the texture image (Landscape-diffuse.png <)? without affecting the original image?

thx Smile

PHP Code:
<control type="image">
                     <
left>-240</left>
                    <
top>10</top>
                     <
width>630</width>
                     <
height>315</height>
                     <
texture background="true">frames/Landscape-diffuse.png</texture>                     
                     <
aspectratio>scale</aspectratio>
                     <
colordiffuse>base_2</colordiffuse>
                  </
control 
>
Reply
#2
1. Colordiffuse
Either use the colordiffuse tag, or colordiffuse attribute on the texture tag. This does not work if you already have a colordiffuse tag, because it will be overwritten.
Convert the wanted opacity to hexadecimal and use that for the alpha part of the color. For example, 50% becomes 80FFFFFF.

Code:
<control type="image">
    ...
    <texture background="true" colordiffuse="80FFFFFF">frames/Landscape-diffuse.png</texture>
    ...
</control>

2. Animation
This may not work well in combination with Fade animations, it should work fine with any of the other animations.

Code:
<control type="image">
    ...
    <texture background="true">frames/Landscape-diffuse.png</texture>
    <animation condition="true" effect="Fade" start="50" end="50" time="0">Conditional</animation>
    ...
</control>

3. Diffuse texture
This should work if you already have a colordiffuse or fade animation, but it gives less control. Create a 1x1 png with a single white and transparent pixel. A pixel with 50% transparency will make the final image also 50% transparent.

Code:
<control type="image">
    ...
    <texture background="true" diffuse="diffuse-transparent-50.png">frames/Landscape-diffuse.png</texture>
    ...
</control>


By the way, this wiki page gives some more useful information on textures.
Image
Reply
#3
thank you very much ; I'll do that now Smile
Reply
#4
I just tried it and it is great to reduce the point of the skin and keep the same image to another function. thank you very much, other thing I have a problem that will not correct. when I move the movie file, fanart do a flash made ​​each change. As before there was a white image behind. You know this problem?
Reply

Logout Mark Read Team Forum Stats Members Help
add opacity function0