Setting multiple selection
#1
Hello, I was wondering how to add a setting but with several possible selections like in this setting: 
Image

Thanks
Reply
#2
well i think this is something build in kodi but you can create radiobuttons for multiple selections
Reply
#3
(2021-04-11, 04:43)moshep15 Wrote: well i think this is something build in kodi but you can create radiobuttons for multiple selections

Thanks for your answer... But a radiobutton is only on/off so it is not possible to choose multiples settings
Reply
#4
(2021-04-11, 06:21)Bungee_G Wrote:
(2021-04-11, 04:43)moshep15 Wrote: well i think this is something build in kodi but you can create radiobuttons for multiple selections

Thanks for your answer... But a radiobutton is only on/off so it is not possible to choose multiples settings

You can use a button control with different onclick conditions and corresponding secondary labels. That way you can toggle through a list of setting states. You won't get a settings list where a few settings can be active at the same time. Those settings options are exclusively available for built-in Kodi settings, I'm afraid.
The only way to get something really close to that would be to build a list of radiobutton controls that emulate a Kodi settings list.
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#5
Use script.toolbox.

https://github.com/phil65/script.toolbox
Reply
#6
(2021-04-11, 14:27)Hitcher Wrote: Use script.toolbox.

https://github.com/phil65/script.toolbox

Thanks for this but when I try to install script.toolbox I get an error, is it compatible with Kodi Matrix ?
Reply
#7
Did you install through Kodi?
Reply
#8
https://github.com/xbmc/repo-scripts/tre...pt.toolbox
Reply
#9
(2021-04-11, 19:06)Hitcher Wrote: https://github.com/xbmc/repo-scripts/tre...pt.toolbox
Now it works, thanks !

I would like to try this in Estuary, so if I want to add a multiple selection setting in the skinsettings.xml file

What should I add ? This ? :
xml:
<control type="button"> </control>

If yes what have I to put inside this control button ? For example, if I have 5 options named Test1, Test2, Test3, Test4 and Test5
Reply
#10
https://forum.kodi.tv/showthread.php?tid=207618

xml:
<control type="button">
...
<onclick>SetProperty(Dialog.1.Label,Test)</onclick>
<onclick>SetProperty(Dialog.1.BuiltIn,builtin1)</onclick>
<onclick>SetProperty(Dialog.2.Label,Test 2)</onclick>
<onclick>SetProperty(Dialog.2.BuiltIn,builtin2)</onclick>
<onclick>SetProperty(Dialog.3.Label,Test 3)</onclick>
<onclick>SetProperty(Dialog.3.BuiltIn,builtin3)</onclick>
<onclick>SetProperty(Dialog.4.Label,Test 4)</onclick>
<onclick>SetProperty(Dialog.4.BuiltIn,builtin4)</onclick>
<onclick>RunScript(script.toolbox,info=selectdialog,header=This is a custom dialog)</onclick>
</control>
Reply
#11
you can force dialogselect or better a custom dialog force open and use custom button grouplist


https://github.com/marduklev/skin.swan-a...Select.xml
- here i use it to focus a panel with id 40, in diaog select to chosse just one item based on a custom property which is set before.

xml:

<onload condition="!String.IsEmpty(Window(home).Property(ShortcutPlaylistContent))">SetFocus(40)</onload>
so you should usea grouplist with defined toggle buttons


or using
Skin.SelectBool(header, label1|setting1, label2|setting2)
https://kodi.wiki/view/List_of_built-in_functions

if youre just want select one of a few skinsettings.
will require localized strings.
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#12
(2021-04-11, 20:02)Hitcher Wrote: https://forum.kodi.tv/showthread.php?tid=207618

xml:
<control type="button">
...
<onclick>SetProperty(Dialog.1.Label,Test)</onclick>
<onclick>SetProperty(Dialog.1.BuiltIn,builtin1)</onclick>
<onclick>SetProperty(Dialog.2.Label,Test 2)</onclick>
<onclick>SetProperty(Dialog.2.BuiltIn,builtin2)</onclick>
<onclick>SetProperty(Dialog.3.Label,Test 3)</onclick>
<onclick>SetProperty(Dialog.3.BuiltIn,builtin3)</onclick>
<onclick>SetProperty(Dialog.4.Label,Test 4)</onclick>
<onclick>SetProperty(Dialog.4.BuiltIn,builtin4)</onclick>
<onclick>RunScript(script.toolbox,info=selectdialog,header=This is a custom dialog)</onclick>
</control>
I tried this (I didn't define Test, Test 2, Test 3 and Test 4), but when I click on one of the Test, the window closes : 
xml:
<control type="button" id="920">
                    <label>$LOCALIZE[40374]</label>
                    <include>DefaultSettingButton</include>
                    <onclick>SetProperty(Dialog.1.Label,Test)</onclick>
                    <onclick>SetProperty(Dialog.1.BuiltIn,builtin1)</onclick>
                    <onclick>SetProperty(Dialog.2.Label,Test 2)</onclick>
                    <onclick>SetProperty(Dialog.2.BuiltIn,builtin2)</onclick>
                    <onclick>SetProperty(Dialog.3.Label,Test 3)</onclick>
                    <onclick>SetProperty(Dialog.3.BuiltIn,builtin3)</onclick>
                    <onclick>SetProperty(Dialog.4.Label,Test 4)</onclick>
                    <onclick>SetProperty(Dialog.4.BuiltIn,builtin4)</onclick>
                    <onclick>RunScript(script.toolbox,info=selectdialog,header=Choose a Test)</onclick> 
 </control>
Reply
#13
Thanks for your answer @mardukL , when I use Skin.SelectBool I can only select one option while I want to select the ones I want (all of them, none, 1 or two,...)
Reply
#14
So for example, I have these two image control (clearlogos) :

xml:
<control type="image" name="Test 1">
                    <top>100</top>
                    <width>284</width>
                    <height>110</height>
                    <left>155</left>
                    <aspectratio align="center" aligny="center">keep</aspectratio>
                    <texture>$VAR[LibraryClearLogoVar]</texture>
                    <visible>Control.IsVisible(55)</visible>
                    <visible>Container.Content(episodes)</visible>
</control>

xml:
<control type="image" name="Test 2">
                    <top>100</top>
                    <width>284</width>
                    <height>110</height>
                    <left>155</left>
                    <aspectratio align="center" aligny="center">keep</aspectratio>
                    <texture>$VAR[LibraryClearLogoVar]</texture>
                    <visible>Control.IsVisible(51)</visible>
                    <visible>Container.Content(episodes)</visible>
                </control>

How do I make a setting that permits me to choose if I want to display the clearlogo named Test 1 or Test 2 or both or none ?
I think I forgot to add in these two control :
xml:
<visible>Skin.HasSetting(Test1)</visible>
and 
xml:
<visible>Skin.HasSetting(Test2)</visible>
And 
xml:
<include condition="[Skin.HasSetting(Test1)]">Test 1</include>
and 
xml:
<include condition="[Skin.HasSetting(Test2)]">Test 2</include>

Or I don’t know...
Reply
#15
Can you help me please ? I would like to try with these two control
Reply

Logout Mark Read Team Forum Stats Members Help
Setting multiple selection0