Solved active frame with toggle setting ;)
#1
Hello,

I still need your help: I created a glass effect on each view, POSTER, BANNER LANDSCAPE and I added a toggle active bonton in setting, and code in include and variable, but it does not work. Can you help me?

Thank very much Smile
cheers

VARIA BLE :
PHP Code:
<variable name="global_art_Frame-nf">
        <
value condition="!IsEmpty(ListItem.Property(art_Frame-nf_Image))">$INFO[ListItem.Property(art_Frame-nf_Image)]</value>
        <
value condition="!IsEmpty(ListItem.Art(art_Frame-nf))">$INFO[ListItem.Art(art_Frame-nf)]</value>
        <
value condition="!IsEmpty(ListItem.Art(thumb))">$INFO[ListItem.Art(thumb)]</value>
        <
value condition="!IsEmpty(ListItem.Art(poster))">$INFO[ListItem.Art(poster)]</value>
        <
value condition="IsEmpty(ListItem.Art(landscape))">$INFO[ListItem.Art(landscape)]</value>
        <
value>frames/frame-nf.png</value>
    </
variable

INCLUDE :
PHP Code:
<include name="art_Frame-nf">
        <
texture>$VAR[art_Frame-nf]</texture>
        <
aspectratio>stretch</aspectratio>
    </include> 

SKIN SETTING

PHP Code:
<!--global art_Frame-nf-->
                    <
control type="radiobutton" id="711">
                        <
label>Active Frame Glass</label>
                        <
onclick>Skin.ToggleSetting(Frame-nf.global)</onclick>
                        <
selected>!Skin.HasSetting(Frame-nf.global)</selected>
                        <include>
settings_Radiobutton</include>
                    </
control


Code in view
PHP Code:
<control type="image">
                    <
left>-5</left>
                    <
top>-4</top>
                    <
width>437</width>
                    <
height>249</height>
                    <include>
art_Frame-nf</include>
                    <
aspectratio>stretch</aspectratio>   
                </
control
Reply
#2
I think it is some thing like that.I m really lost on this code. I think it have to link Enable and Disable. I watched lots of examples, and the wiki, but English is not my mother tongue, and I'm very bad , I do not know where to look, and how write this function in the wiki search in english !

PHP Code:
<variable name="art_Frame-nf">
        <
value condition="Skin.HasSetting(Disable.art_Frame-nf)">?</value>
        <
value>frames/frame-nf.png</value>
    </
variable

And :
PHP Code:
<control type="radiobutton" id="711">
                        <
label>disable Frame Glass</label>
                        <
onclick>Skin.ToggleSetting(art_Frame-nf.disable)</onclick>
                        <
selected>!Skin.HasSetting(art_Frame-nf.disable)</selected>
                        <include>
settings_Radiobutton</include>
                    </
control
Reply
#3
[Edit] Nevermind you also have a variable with that name.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#4
I understands that there is a concern, but I do not understand how to change it, I tried several ways, several forms and test.

There are values ​​that I do not know how to fill them.
I find no example of what I want to do:

in the other skin, I tried to make a code to put it on my code, but I mix and I do not understand anything. This must surely be very simple, but I do not see success
Reply
#5
Variables are set in Variables.xml (at least they are in reFocus, this is skin dependant)

If you can't find where an include, variable or whatever is defined, simply use the search function of your file manager or code editor.
Reply
#6
Is this what you want to do?

Code:
<control type="image">
        <texture>$VAR[My_Image]</texture>
</control>

<control type="image">
        <texture>Glass.png</texture>
        <visible>Skin.HasSetting(Enable.Glass)</visible>
</control>

Code:
<variable name="My_Image">
        <value condition="!IsEmpty(ListItem.Art(poster))">$INFO[ListItem.Art(poster)]</value>
        <value condition="!IsEmpty(ListItem.Art(thumb))">$INFO[ListItem.Art(thumb)]</value>
</variable>

Code:
<control type="radiobutton">
        <label>Enable Glass</label>
        <onclick>Skin.ToggleSetting(Enable.Glass)</onclick>
        <selected>Skin.HasSetting(Enable.Glass)</selected>
</control>
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#7
Thank you for your answers, but it is not a problem to find the files. The trouble is that I have tried several things and I do not understand how, enable and disable the frame-nf / I'll take the wind a bit and come back later. Much research, it gives me a headacheWink laugh

I just saw your reply! Yes thank you! I'll try it tomorrow! A big thank you!

Is that what you gave me is with a button to enable / disable the menu setting on skin, or on each view with a button?

sorry , i no see this "

<control type="radiobutton">
<label>Enable Glass</label>
<onclick>Skin.ToggleSetting(Enable.Glass)</onclick>
<selected>Skin.HasSetting(Enable.Glass)</selected>
</control>

"
Reply
#8
The radiobutton goes in skin settings. But it is just an example, you still have to add your ID and include ect.

id="711"

<include>settings_Radiobutton</include>

--------------------------------------------------------------------------------

And every view (that you want this in) needs the image with Glass.png

With that same skin setting, so you can toggle them all at the same time.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#9
I understand this now Smile

Thank you very much Mass IV.

cheer
Reply
#10
I do not understand this: Is what I should also add that in xml includes?

I figured out how to add the image file in order, but includes not I understand!

sorry !

<control type="image">
<texture> $ VAR [My_Image] </ texture>
</ control>

<control type="image">
<texture> Glass.png </ texture>
<visible> Skin.HasSetting (Enable.Glass) </ visible>
</ control>


EDIT : I found where I made ​​the mistake. This work now, thank you Smile
Reply
#11
when active effect glass , the poster are duplicate ! Image

how to do for correct this it


EDIT !!!!!!! I found Thx
Reply

Logout Mark Read Team Forum Stats Members Help
active frame with toggle setting ;)0