Help about buttons
#1
Hi, hope you can help me with these questions
Question 1 - I'm trying to make two buttons that go to different functions. Here are the buttons

PHP Code:
<control type="button" id="160">
                        <
description>Manual</description>
                        <
label>Manual</label>
                        <include>
DefInfoButtons</include>
                        <
onclick condition="Control.IsVisible(50)">SendClick(1128,5)</onclick>
                        <
onclick>SetProperty(content,1)</onclick>
                        <
onclick>SetFocus(9501)</onclick>        
                        <
visible>!IsEmpty(ListItem.Studio)</visible>
                    </
control>
                    

                    <
control type="button" id="53">
                        <
description>Ano</description>
                        <
label>Ano</label>
                        <include>
DefInfoButtons</include>
                        <
onclick condition="Control.IsVisible(50)">SendClick(1128,5)</onclick>
                        <
onclick>SetProperty(content,2)</onclick>
                        <
onclick>SetFocus(9501)</onclick>        
                        <
visible>!IsEmpty(ListItem.Year)</visible>            
                    </
control

And the content

PHP Code:
<control type="label" id="1">
                    <
visible>Control.IsVisible(50) | [!IsEmpty(Window.Property(content)) + !Container(9501).IsUpdating]</visible>
                    <
left>540</left>
                    <
right>SidePad</right>
                    <
top>260</top>
                    <
description>Header Label</description>
                    <
textcolor>Dark2</textcolor>
                    <
font>Small</font>
                    <
label>$INFO[ListItem.Studio]</label>
                    <include>
Animation.DelayFadeIn</include>
                </
control>
                
        <
control type="label" id="2">
                    <
visible>Control.IsVisible(50) | [!IsEmpty(Window.Property(content)) + !Container(9501).IsUpdating]</visible>
                    <
left>540</left>
                    <
right>SidePad</right>
                    <
top>260</top>
                    <
description>Header Label</description>
                    <
textcolor>Dark2</textcolor>
                    <
font>Small</font>
                    <
label>$INFO[ListItem.Year]</label>
                    <include>
Animation.DelayFadeIn</include>
                </
control

The problem is that, if I click on the button the content appears superimposed over the other. How can I link the different buttons to different content. I Already saw the wiki, but only found this - http://kodi.wiki/view/Built-in_functions..._to_python



Question 2 - I have a button that basically has to start the game that I'm showing the info on the Advanced launcher, How is that done?

Image



Question 3 - if I want to use a addon to open an content (example(listItem.manual)), I have to make something like this, correct? this works for every addon? how can I know the parameters of an specific addon?

PHP Code:
<control type="button" id="random">
                        <
label>Manual<label>
                        <
onclick>XBMC.RunScript(script.name.of.the.addonmode=guimediatype=it's pdf but I don't know what to write heredbid=ListItem.manual)</onclick>
                  
                        <
desription>Manual</description>
                        <include>
DefInfoButtons</include>
                    </
control

Thanks in advance for the help
Best Regards
Reply
#2
Q1 you need to check the property content is 1 or 2, not just if empty, it is showing both because content has property, so:

Code:
<visible>Control.IsVisible(50) | [String.IsEqual(Window.Property(content),1) + !Container(9501).IsUpdating]</visible>
Reply
#3
(2017-01-15, 18:11)badaas Wrote: Q1 you need to check the property content is 1 or 2, not just if empty, it is showing both because content has property, so:

Code:
<visible>Control.IsVisible(50) | [String.IsEqual(Window.Property(content),1) + !Container(9501).IsUpdating]</visible>
You are right. The conditions wasn't correct. It was working with previous stuff that I'm modding, and now I don't know why, but that's not important. Thanks for the help

Can anybody help on the other two questions.
Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Help about buttons0