Posts: 14
Joined: Apr 2010
Reputation:
0
Hi,
I have a list of togglebutton's and I would like to unselect one before the new one is selected.
I tried python but it doesn't have the type tooglebutton or something like that.
Is there anyway to do this via the XML of the skin?
Can anyone help me?
Regards
Posts: 26,215
Joined: Oct 2003
Reputation:
187
You could do it via skin conditionals. i.e. you'd toggle a setting on and have the other toggle buttons have a <usealttexture> conditional on that setting.
It's a bit messy - ideally we'd support some sort of "radio button group" to tie them together into a mutually exclusive thing. Generally we use a spinner for this sort of thing, but I admit that it doesn't always work the best.
Cheers,
Jonathan
Posts: 14
Joined: Apr 2010
Reputation:
0
How can I access the settings that you are talking about?
Posts: 14
Joined: Apr 2010
Reputation:
0
I have this script from a boxee app:
def resetMenu(id):
reg = mc.GetApp().GetLocalConfig()
reg.ResetAll()
reg.SetValue(str(id), "true")
then call it via:
<usealttexture>App.HasSetting(9001)</usealttexture>
<onclick lang="python">
<![CDATA[resetMenu(9001)]]>
</onclick>
It possible to translate?
Posts: 14
Joined: Apr 2010
Reputation:
0
Found it...
<usealttexture>Skin.HasSetting(7560)</usealttexture> <---- Verifies if the setting is set
<onclick> Skin.ResetSettings()</onclick> <---- Clear all the settings
<onclick>Skin.ToggleSetting(7560)</onclick> <---- Activate a setting
<onclick>Skin.ToggleSetting(776)</onclick>