Kodi Community Forum

Full Version: Get label of the left side settings category ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm looking for something similar to Control.GetLabel(2) for settingscategory.xml, but for the left hand side grouplist (id=3)

e.g. When in appearance settings the categories are - skin, international, file lists, screensaver. I'm trying to get the label for what is currently selected in that grouplist. Control.GetLabel(2) returns the overall category (e.g. Appearance) but I want to get say for example 'international' if that is selected.

I've tried Control.GetLabel(3) and Control.GetLabel(10) [default category button] and Container(3).ListItem.Label but I can't figure anything out that works. It seems like I should be able to do it, but perhaps its not possible...

Any Ideas?
Not possible. What are you trying to do exactly?
Also tried that but it's not possible.
Ah that's a shame

@Hitcher - Its for a new skin I'm working on. I wanted to have a header such as: 'The International Settings for Appearance' so that I could hide the categories in a slide out menu. Also wanted to do a string match to change an icon in the header. Not the end of the world, but would have been a nice stylistic match for the rest of the skin...
@Black - I actually figured out a trick for this

For group id 3 I set a window property onfocus and ondown/onleft etc.
Code:
<onfocus>SetProperty(SettingLabel,$INFO[System.CurrentControl])</onfocus>
<ondown>SetProperty(SettingLabel,$INFO[System.CurrentControl])</ondown>

Then I have a label variable like such
Code:
<value condition="!ControlGroup(5).HasFocus()">$INFO[System.CurrentControl]</value>
<value>$INFO[Window.Property(SettingLabel)]</value>

Also, in the process of testing this I noticed that ControlGroup(3).HasFocus() doesn't work in SettingsCategory.xml, hence why I check controlgroup 5 instead.
Good to know, thanks for the tip.
Heh, nice hack Smile