Setting multiple selection
#16
@Hitcher I just saw that in the link you sent : "no, it doesnt support multiselect natively so it needs a bit more code in python, but still pretty easy to do."

So is it not possible ?
Reply
#17
Sorry, I forgot I changed over to using Skin.SelectBool that mardukL mentioned earlier.
Reply
#18
(2021-04-11, 23:15)Hitcher Wrote: Sorry, I forgot I changed over to using Skin.SelectBool that mardukL mentioned earlier.

Thanks for your answer, I already use Skin.SelectBool for some settings but i can with that select one setting only
Reply
#19
You need to separate each setting with | like I do here in my skin -

xml:
<control id="23" type="button">
<width>958</width>
<height>84</height>
<font>Light32</font>
<label>$LOCALIZE[31257]</label>
<label2>$VAR[TomatoRating]</label2>
<textoffsetx>40</textoffsetx>
<textcolor>ff505153</textcolor>
<focusedcolor>ffffaf37</focusedcolor>
<texturefocus border="3">settings/button_focus.png</texturefocus>
<texturenofocus border="3">settings/button_no_focus.png</texturenofocus>
<onclick>Skin.SelectBool(31257, 31258|TomatoMeterAllCritics, 31259|TomatoMeterAudienceScore, 31260|AverageRatingAllCritics, 31261|AverageRatingAudienceScore)</onclick>
</control>

https://github.com/HitcherUK/skin.ftv/bl...s.xml#L407
Reply
#20
(2021-04-12, 01:18)Hitcher Wrote: You need to separate each setting with | like I do here in my skin -

xml:
<control id="23" type="button">
<width>958</width>
<height>84</height>
<font>Light32</font>
<label>$LOCALIZE[31257]</label>
<label2>$VAR[TomatoRating]</label2>
<textoffsetx>40</textoffsetx>
<textcolor>ff505153</textcolor>
<focusedcolor>ffffaf37</focusedcolor>
<texturefocus border="3">settings/button_focus.png</texturefocus>
<texturenofocus border="3">settings/button_no_focus.png</texturenofocus>
<onclick>Skin.SelectBool(31257, 31258|TomatoMeterAllCritics, 31259|TomatoMeterAudienceScore, 31260|AverageRatingAllCritics, 31261|AverageRatingAudienceScore)</onclick>
</control>

https://github.com/HitcherUK/skin.ftv/bl...s.xml#L407

If you are talking about this line : 
xml:
<onclick>Skin.SelectBool(31257, 31258|TomatoMeterAllCritics, 31259|TomatoMeterAudienceScore, 31260|AverageRatingAllCritics, 31261|AverageRatingAudienceScore)</onclick>

I already tried to separate like this : 31258|TomatoMeterAllCritics but when I do that, when I click on one of the option, the window closes so I can only choose one setting

EDIT : I just tried that setting on your skin but you can select only one setting among 4 settings... I think you didn't understand what I want to do... I want to be able to select multiple settings among many settings and NOT one setting among many settings, I would like something like the keyboard setting (I sent a photo in the #1 message)
Reply
#21
Ah right, sorry misunderstood. Your just going to have to use a grouplist full of toggle/radio buttons in that case then.
Reply
#22
As mentionined earlier you can force dialogselect or use a custom window.


check the skinning wiki carefull

grouplist control    - https://kodi.wiki/view/Group_List_Control
button control       - https://kodi.wiki/view/Button_control
                           - https://kodi.wiki/view/List_of_built-in_...ilt-in.27s 'lookup' skin.togglesetting()

custom window     - https://kodi.wiki/view/HOW-TO:Add_a_new_...a_skinning

for your images     - https://kodi.wiki/view/Image_Control
 and set visible conditions   -  https://kodi.wiki/view/Conditional_visibility  | https://kodi.wiki/view/List_of_boolean_conditions#Skin
    
    
 
e.g.
here is an example how i use my custom window and toggle mutlitple button in a grouplist

https://github.com/marduklev/skin.swan-a...ration.xml
    custom window
    
xml:

    <?xml version="1.0" encoding="UTF-8"?>
<window id="1103" type="dialog">
    <defaultcontrol always="true">110</defaultcontrol>
    <onunload condition="String.IsEmpty(Window(home).Property(SetShortcutInProgress))">ClearProperty(shortcutitem_nr,home)</onunload>
    <onunload>ClearProperty(SettingSection,home)</onunload>
    
    <controls>
        
        <control type="group">
            <include>global_background</include>
        </control>
        
        <control type="grouplist">
            <visible>!Window.IsVisible(selectdialog) + !Window.IsVisible(numericinput) + !Window.IsVisible(virtualkeyboard)</visible>
            <include>Animation_OpenClose_Zoom</include>
            <!-- fit skinsettings windows  -->
            <right>20</right>
            <width>70%</width>
            <!-- <left>5%</left>
            <width>90%</width> -->
            
            <top>20%</top>
            <height max="80%">auto</height>
            <orientation>vertical</orientation>
            <itemgap>20</itemgap>
            <align>center</align>
            
            <control type="group">
                <height>600</height>
        
                <control type="label">
                    <top>-80</top>
                    <width>100%</width>
                    <height>60</height>
                    <font>Reg27</font>
                    <aligny>center</aligny>
                    <textoffsetx>5</textoffsetx>
                    <textcolor>white</textcolor>
                    <label>$VAR[1103_header]</label>
                </control>                
                <!--
                <control type="image">
                    <height>600</height>
                    <texture colordiffuse="CC101010">colors/white.png</texture>
                    <aspectratio>stretch</aspectratio>
                </control>
                -->
                
                <control type="grouplist" id="110">
                    <description>using $PARAM[win(home)prop], or just $INFO[win(home)prop] failing in include so use as condition</description>
                    <centerleft>50%</centerleft>
                    <top>10</top>
                    <height>590</height>
                    <onup>110</onup>
                    <onleft>200</onleft>
                    <onright condition="Control.IsVisible(60)">60</onright>
                    <onright condition="!Control.IsVisible(60)">200</onright>
                    
                    <onback condition="!String.IsEmpty(Window(home).Property(shortcutitem_nr))">ClearProperty(shortcutitem_nr,home)</onback>
                    <onback condition="!String.IsEmpty(Window(home).Property(SetShortcutInProgress))">ClearProperty(SetShortcutInProgress,home)</onback>
                
                    <ondown>200</ondown>
                    <pagecontrol>60</pagecontrol>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),SwanWidgetShortcuts)">1103_Content_SwanWidgetShortcuts</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),WidgetAttributes)">1103_Content_WidgetAttributes</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),MainmenuAttributes)">1103_Content_MainmenuAttributes</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),VideoInfoButtonVisibility)">1103_Content_VideoInfoButtonVisibility</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),VideoInfoContainerVisibility)">1103_Content_VideoInfoContainerVisibility</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),SetBlurStrength)">1103_Content_SetBlurStrength</include>
                </control>

                <control type="scrollbar" id="60">
                    <right>0</right>
                    <top>0</top>
                    <bottom>0</bottom>
                    <onleft>110</onleft>
                    <onright>200</onright>
                </control>
            
            </control>
            
            <control type="grouplist" id="200">
                <height>50</height>
                <width>100%</width>
                <orientation>horizontal</orientation>
                <itemgap>5</itemgap>
                <align>center</align>
                <onright>60</onright>
                <onleft>110</onleft>
                <control type="button" id="201">
                    <width>auto</width>
                    <label>$LOCALIZE[15067]</label>
                    <onup>110</onup>
                    <onclick>close</onclick>
                    <onclick condition="!String.IsEmpty(Window(home).Property(shortcutitem_nr))">ClearProperty(shortcutitem_nr,home)</onclick>
                    <onclick condition="!String.IsEmpty(Window(home).Property(SetShortcutInProgress))">ClearProperty(SetShortcutInProgress,home)</onclick>
                </control>
            </control>
        </control>
        <include content="swan_debug_overlay" />
    </controls>
</window>



    1103_Content_VideoInfoButtonVisibility
    
xml:

    
    <include name="1103_Content_VideoInfoButtonVisibility">
        <control type="radiobutton" id="11031">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_play)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_play)</selected>
            <label>Disable Play</label>
        </control>
        <control type="radiobutton" id="11032">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_resume)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_resume)</selected>
            <label>Disable Resume</label>
        </control>
        <control type="radiobutton" id="11033">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_KodiGetThumb)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_KodiGetThumb)</selected>
            <label>Disable Get Thumb (Kodi native)</label>
        </control>
        <control type="radiobutton" id="11034">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_BeefGetThumb)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_BeefGetThumb)</selected>
            <label>Disable Get Thumb (Artwork Beef)</label>
        </control>
        <control type="radiobutton" id="11035">
            <onclick>Skin.ToggleSetting(VideoInfo_EmbuaryTMDBInfo)</onclick>
            <selected>Skin.HasSetting(VideoInfo_EmbuaryTMDBInfo)</selected>
            <visible>System.HasAddon(script.embuary.info)</visible>
            <label>Disable Embuary TMDBInfo</label>
        </control>
        
        <control type="radiobutton" id="11036">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_Plot)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_Plot)</selected>
            <label>Disable Plot</label>
        </control>
        <control type="radiobutton" id="11037">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_Rate)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_Rate)</selected>
            <label>Disable Rate Title</label>
        </control>
        <control type="radiobutton" id="11038">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_Trailer)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_Trailer)</selected>
            <label>Disable Trailer</label>
        </control>
        
    </include>
    
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#23
(2021-04-12, 11:35)mardukL Wrote: As mentionined earlier you can force dialogselect or use a custom window.


check the skinning wiki carefull

grouplist control    - https://kodi.wiki/view/Group_List_Control
button control       - https://kodi.wiki/view/Button_control
                           - https://kodi.wiki/view/List_of_built-in_...ilt-in.27s 'lookup' skin.togglesetting()

custom window     - https://kodi.wiki/view/HOW-TO:Add_a_new_...a_skinning

for your images     - https://kodi.wiki/view/Image_Control
 and set visible conditions   -  https://kodi.wiki/view/Conditional_visibility  | https://kodi.wiki/view/List_of_boolean_conditions#Skin
    
    
 
e.g.
here is an example how i use my custom window and toggle mutlitple button in a grouplist

https://github.com/marduklev/skin.swan-a...ration.xml
    custom window
    
xml:

    <?xml version="1.0" encoding="UTF-8"?>
<window id="1103" type="dialog">
    <defaultcontrol always="true">110</defaultcontrol>
    <onunload condition="String.IsEmpty(Window(home).Property(SetShortcutInProgress))">ClearProperty(shortcutitem_nr,home)</onunload>
    <onunload>ClearProperty(SettingSection,home)</onunload>
    
    <controls>
        
        <control type="group">
            <include>global_background</include>
        </control>
        
        <control type="grouplist">
            <visible>!Window.IsVisible(selectdialog) + !Window.IsVisible(numericinput) + !Window.IsVisible(virtualkeyboard)</visible>
            <include>Animation_OpenClose_Zoom</include>
            <!-- fit skinsettings windows  -->
            <right>20</right>
            <width>70%</width>
            <!-- <left>5%</left>
            <width>90%</width> -->
            
            <top>20%</top>
            <height max="80%">auto</height>
            <orientation>vertical</orientation>
            <itemgap>20</itemgap>
            <align>center</align>
            
            <control type="group">
                <height>600</height>
        
                <control type="label">
                    <top>-80</top>
                    <width>100%</width>
                    <height>60</height>
                    <font>Reg27</font>
                    <aligny>center</aligny>
                    <textoffsetx>5</textoffsetx>
                    <textcolor>white</textcolor>
                    <label>$VAR[1103_header]</label>
                </control>                
                <!--
                <control type="image">
                    <height>600</height>
                    <texture colordiffuse="CC101010">colors/white.png</texture>
                    <aspectratio>stretch</aspectratio>
                </control>
                -->
                
                <control type="grouplist" id="110">
                    <description>using $PARAM[win(home)prop], or just $INFO[win(home)prop] failing in include so use as condition</description>
                    <centerleft>50%</centerleft>
                    <top>10</top>
                    <height>590</height>
                    <onup>110</onup>
                    <onleft>200</onleft>
                    <onright condition="Control.IsVisible(60)">60</onright>
                    <onright condition="!Control.IsVisible(60)">200</onright>
                    
                    <onback condition="!String.IsEmpty(Window(home).Property(shortcutitem_nr))">ClearProperty(shortcutitem_nr,home)</onback>
                    <onback condition="!String.IsEmpty(Window(home).Property(SetShortcutInProgress))">ClearProperty(SetShortcutInProgress,home)</onback>
                
                    <ondown>200</ondown>
                    <pagecontrol>60</pagecontrol>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),SwanWidgetShortcuts)">1103_Content_SwanWidgetShortcuts</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),WidgetAttributes)">1103_Content_WidgetAttributes</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),MainmenuAttributes)">1103_Content_MainmenuAttributes</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),VideoInfoButtonVisibility)">1103_Content_VideoInfoButtonVisibility</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),VideoInfoContainerVisibility)">1103_Content_VideoInfoContainerVisibility</include>
                    <include condition="String.IsEqual(Window(home).Property(SettingSection),SetBlurStrength)">1103_Content_SetBlurStrength</include>
                </control>

                <control type="scrollbar" id="60">
                    <right>0</right>
                    <top>0</top>
                    <bottom>0</bottom>
                    <onleft>110</onleft>
                    <onright>200</onright>
                </control>
            
            </control>
            
            <control type="grouplist" id="200">
                <height>50</height>
                <width>100%</width>
                <orientation>horizontal</orientation>
                <itemgap>5</itemgap>
                <align>center</align>
                <onright>60</onright>
                <onleft>110</onleft>
                <control type="button" id="201">
                    <width>auto</width>
                    <label>$LOCALIZE[15067]</label>
                    <onup>110</onup>
                    <onclick>close</onclick>
                    <onclick condition="!String.IsEmpty(Window(home).Property(shortcutitem_nr))">ClearProperty(shortcutitem_nr,home)</onclick>
                    <onclick condition="!String.IsEmpty(Window(home).Property(SetShortcutInProgress))">ClearProperty(SetShortcutInProgress,home)</onclick>
                </control>
            </control>
        </control>
        <include content="swan_debug_overlay" />
    </controls>
</window>



    1103_Content_VideoInfoButtonVisibility
    
xml:

    
    <include name="1103_Content_VideoInfoButtonVisibility">
        <control type="radiobutton" id="11031">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_play)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_play)</selected>
            <label>Disable Play</label>
        </control>
        <control type="radiobutton" id="11032">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_resume)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_resume)</selected>
            <label>Disable Resume</label>
        </control>
        <control type="radiobutton" id="11033">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_KodiGetThumb)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_KodiGetThumb)</selected>
            <label>Disable Get Thumb (Kodi native)</label>
        </control>
        <control type="radiobutton" id="11034">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_BeefGetThumb)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_BeefGetThumb)</selected>
            <label>Disable Get Thumb (Artwork Beef)</label>
        </control>
        <control type="radiobutton" id="11035">
            <onclick>Skin.ToggleSetting(VideoInfo_EmbuaryTMDBInfo)</onclick>
            <selected>Skin.HasSetting(VideoInfo_EmbuaryTMDBInfo)</selected>
            <visible>System.HasAddon(script.embuary.info)</visible>
            <label>Disable Embuary TMDBInfo</label>
        </control>
        
        <control type="radiobutton" id="11036">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_Plot)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_Plot)</selected>
            <label>Disable Plot</label>
        </control>
        <control type="radiobutton" id="11037">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_Rate)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_Rate)</selected>
            <label>Disable Rate Title</label>
        </control>
        <control type="radiobutton" id="11038">
            <onclick>Skin.ToggleSetting(VideoInfo_Button_Trailer)</onclick>
            <selected>Skin.HasSetting(VideoInfo_Button_Trailer)</selected>
            <label>Disable Trailer</label>
        </control>
        
    </include>
    

Could you show me a screenshot of the result of this please ? I cannot install the skin on Kodi Matrix
Reply
#24
I tried to make a grouplist of radiobutton but it didn't work...  

I have these two radiobutton to test :

xml:
<control type="radiobutton" id="901">
                    <label>$LOCALIZE[40345]</label>
                    <include>DefaultSettingButton</include>
                    <selected>!Skin.HasSetting(Test1)</selected>
                    <onclick>Skin.ToggleSetting(Test1)</onclick>
                </control>
                <control type="radiobutton" id="909">
                    <label>$LOCALIZE[40374]</label>
                    <include>DefaultSettingButton</include>
                    <selected>!Skin.HasSetting(Test2)</selected>
                    <onclick>Skin.ToggleSetting(Test2)</onclick>
                </control>

They are located in the SkinSettings.xml file in the Estuary Skin and they are displayed in General
Reply
#25
@mardukL or @Hitcher

Can you help me with what I send in my previous message please ?
Reply
#26
What do you mean by it doesn't work?
Reply
#27
(2021-04-12, 23:22)Hitcher Wrote: What do you mean by it doesn't work?

I tried something but it didn’t work... I don’t know how to do that so I would like to know what have I to do with these two buttons ? They are already in a group list in this skinsettings.xml file : https://github.com/xbmc/xbmc/blob/master...ttings.xml
Reply
#28
Hello @mardukL I am still trying to do that if you can help me please
Reply
#29
Or maybe @Hitcher ?
Reply

Logout Mark Read Team Forum Stats Members Help
Setting multiple selection0