Making a radiobutton to allow Movie submenus in a custom Home item
#1
Right now my visible for Movie submenu is:

<visible>Container(300).HasFocus(3)</visible>

What I'd like is somethings like:
PHP Code:
<visible>Container(300).HasFocus(1) | $INFO[Skin.String(Menu_Custom15)]</visible

Where $INFO[Skin.String(Menu_Custom15)] gets translated to Container(300).HasFocus(20)

But I can't think of a way to make a radiobutton that a user can check to allow this? Thx...
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#2
Kind bump just in case some of the veterans missed it, thx...
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#3
maybe you can do this with two radiobuttons?

here's some totally untested, too early in the morning, need more coffee and shouldn't be answering in the first place code:
Code:
<control type="radiobutton">
    <onclick>Skin.SetString(Menu_Custom15,Container(300).HasFocus(20))</onclick>
    <visible>IsEmpty(Skin.String(Menu_Custom15))</visible>
</control>
<control type="radiobutton">
    <onclick>Skin.Reset(Menu_Custom15)</onclick>
    <visible>!IsEmpty(Skin.String(Menu_Custom15))</visible>
</control>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Wow, you always know these hard/trickey questions

So far just this works:

PHP Code:
<control type="radiobutton" id="18201">
                                <include>
skin_settings_button</include>
                                <
label>Allow Movie Subs</label>
                                <
onfocus>Skin.SetString(subcust1,Container(300).HasFocus(15))</onfocus>
                                <
onclick>Skin.ToggleSetting(subcust1)</onclick>
                                <
selected>Skin.HasSetting(subcust1)</selected>
                                <
visible>Skin.HasSetting(Menu_Custom1) + Skin.String(MoviesCustom,1)</visible>
                            </
control


Which translates into:
Quote:<setting type="string" name="skin.night.subcust1">Container(300).HasFocus(20)</setting>

Thus, so far in my tests, will allow users to add submenus
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#5
PHP Code:
<control type="radiobutton" id="18201">
                                <include>
skin_settings_button</include>
                                <
label>- Allow Movie Subs on this selection</label>
                                <
onclick>Skin.Reset(allow_tv_subs_1)</onclick
                                <
onclick>Skin.SetString(allow_movie_subs_1,Container(300).HasFocus(15))</onclick>
                                <
onclick>Skin.ToggleSetting(allow_movie_subs_1)</onclick>
                                <
selected>Skin.HasSetting(allow_movie_subs_1)</selected>
                                <
visible>Skin.HasSetting(Menu_Custom1) + Skin.String(MoviesCustom,1)</visible>
                            </
control>
                            <
control type="radiobutton" id="18202">
                                <include>
skin_settings_button</include>
                                <
label>- Allow TV Subs on this selection</label>
                                <
onclick>Skin.Reset(allow_movie_subs_1)</onclick
                                <
onclick>Skin.SetString(allow_tv_subs_1,Container(300).HasFocus(15))</onclick>
                                <
onclick>Skin.ToggleSetting(allow_tv_subs_1)</onclick>
                                <
selected>Skin.HasSetting(allow_tv_subs_1)</selected>
                                <
visible>Skin.HasSetting(Menu_Custom1) + Skin.String(MoviesCustom,1)</visible>
                            </
control

Really close the above works perfect except visually the radiobuttons do not click off when I click the other one? Like if I click the Movie one then click TV, the Movie one stills stays checked

Behind the scenes, guisettings.xml, everything works but to be user friendly I would need the it to look like one undos the other....

**EDIT**
Persistence is a virtue
PHP Code:
<control type="radiobutton" id="18201">
                                <include>
skin_settings_button</include>
                                <
label>- Allow Movie Subs on this selection</label>
                                <
onclick>Skin.Reset(toggle_tv_subs_1)</onclick
                                <
onclick>Skin.Reset(allow_tv_subs_1)</onclick
                                <
onclick>Skin.SetString(allow_movie_subs_1,Container(300).HasFocus(15))</onclick>
                                <
onclick>Skin.ToggleSetting(toggle_movie_subs_1)</onclick>
                                <
selected>Skin.HasSetting(toggle_movie_subs_1)</selected>
                                <
visible>Skin.HasSetting(Menu_Custom1) + Skin.String(MoviesCustom,1)</visible>
                            </
control>
                            <
control type="radiobutton" id="18202">
                                <include>
skin_settings_button</include>
                                <
label>- Allow TV Subs on this selection</label>
                                <
onclick>Skin.Reset(toggle_movie_subs_1)</onclick
                                <
onclick>Skin.Reset(allow_movie_subs_1)</onclick
                                <
onclick>Skin.SetString(allow_tv_subs_1,Container(300).HasFocus(15))</onclick>
                                <
onclick>Skin.ToggleSetting(toggle_tv_subs_1)</onclick>
                                <
selected>Skin.HasSetting(toggle_tv_subs_1)</selected>
                                <
visible>Skin.HasSetting(Menu_Custom1) + Skin.String(MoviesCustom,1)</visible>
                            </
control
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply

Logout Mark Read Team Forum Stats Members Help
Making a radiobutton to allow Movie submenus in a custom Home item0