Hello
Q: How to add widget menu additionally at Customize Main Menu?
Settings-> Skin settings -> Home -> Custom home menu -> Customize Main Menu
I am using Arctic Zephyr: Leia mod.
Currently, it can add up to 5 widgets for each sections, but I want to add one more with code work.
This is now what I see.
I added some work to add "NEW Widget 1"
Includes.xml
xml:
<control type="button" id="9106" description="Custom">
<width>100%</width>
<height>66</height>
<label>NEW Widget 1 $VAR[LabelWidget6]</label>
<label2>$VAR[LabelWidgetShortcutsName6]</label2>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<include>DefDialogButtonsGradient</include>
<onclick>SetProperty(skinshortcuts-Widget,6,Home)</onclick>
<onclick>SetFocus(4590)</onclick>
<animation effect="fade" start="100" end="50" time="0" condition="!String.Contains(Container(211).ListItem.Property(widgetEnable.6),yes)">Conditional</animation>
<visible>String.IsEmpty(Window(Home).Property(skinshortcuts-Widget))</visible>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<visible>[Skin.HasSetting(home.vertical) + Skin.HasSetting(home.vertical.widgets)] | [Skin.HasSetting(home.modernwidgets) + Skin.HasSetting(home.vertical.widgets)]</visible>
</control>
Includes_Labels.xml
xml:
<variable name="LabelWidget6">
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetFullscreen.6),yes)">$LOCALIZE[37886]</value>
<value/>
</variable>
<variable name="LabelWidgetShortcutsName6">
<value condition="!String.IsEmpty(Container(211).ListItem.Property(widgetName.6))">$INFO[Container(211).ListItem.Property(widgetName.6)]</value>
<value condition="!String.IsEmpty(Container(211).ListItem.Property(background.6))">$LOCALIZE[31110]</value>
<value>$LOCALIZE[31269]</value>
</variable>
<variable name="Enable6">
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetEnable.6),yes)">$LOCALIZE[305]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetEnable.6),no)">$LOCALIZE[1223]</value>
<value>$LOCALIZE[1223]</value>
</variable>
<variable name="LabelWidgetType6">
<value condition="String.IsEqual(Container(211).ListItem.Property(widgettarget.6),system)">$LOCALIZE[31263]</value>
<value condition="String.IsEmpty(Container(211).ListItem.Property(widgetaspect.6)) | String.IsEqual(Container(211).ListItem.Property(widgetaspect.5),Poster)">$LOCALIZE[31262]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Square)">$LOCALIZE[31263]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Fanart)">$LOCALIZE[31265]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Banner) + [$EXP[HomeIsModernMultiWidgets] | $EXP[HomeIsVerticalMultiWidgets]]">$LOCALIZE[20020]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Banner) + !$EXP[HomeIsModernMultiWidgets] + !$EXP[HomeIsVerticalMultiWidgets]">[color=FFC00000]$LOCALIZE[20020] - $LOCALIZE[10005][/color]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Thumbnail)">$LOCALIZE[31264]</value>
</variable>
<variable name="LabelAspectRatio6">
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetAspectRatio.6),scale)">$LOCALIZE[37874]</value>
<value>$LOCALIZE[602]</value>
</variable>
<variable name="LabelSortBy6">
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),lastplayed)">$LOCALIZE[568]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),title)">$LOCALIZE[369]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),tvshowtitle)">$LOCALIZE[36902]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),date)">$LOCALIZE[552]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),artist)">$LOCALIZE[557]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),album)">$LOCALIZE[558]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),tracknumber)">$LOCALIZE[554]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),channelnumber)">$LOCALIZE[19029]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),year)">$LOCALIZE[345]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),dateadded)">$LOCALIZE[570]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),random)">$LOCALIZE[590]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),rating)">$LOCALIZE[563]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),userrating)">$LOCALIZE[38018]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSortby.6),lastused)">$LOCALIZE[12012]</value>
<value>$LOCALIZE[571]</value>
</variable>
<variable name="LabelSort6">
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSort.6),ascending)">$LOCALIZE[584]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetSort.6),descending)">$LOCALIZE[585]</value>
<value>$LOCALIZE[571]</value>
</variable>
<variable name="AutoScrollTime6">
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetAuto.6),5000)"> 5 $LOCALIZE[37899]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetAuto.6),7000)"> 7 $LOCALIZE[37899]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetAuto.6),10000)"> 10 $LOCALIZE[37899]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetAuto.6),15000)"> 15 $LOCALIZE[37899]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetAuto.6),20000)"> 20 $LOCALIZE[37899]</value>
<value condition="String.IsEqual(Container(211).ListItem.Property(widgetAuto.6),25000)"> 25 $LOCALIZE[37899]</value>
<value>$LOCALIZE[1223]</value>
</variable>
script-skinshortcuts.xml
xml:
<!-- KM Widget 6 -->
<control type="grouplist" id="9800">
<onleft>ClearProperty(skinshortcuts-Widget,Home)</onleft>
<onleft>SetFocus(7011)</onleft>
<onright>ClearProperty(skinshortcuts-Widget,Home)</onright>
<onright>SetFocus(7011)</onright>
<onback>ClearProperty(skinshortcuts-Widget,Home)</onback>
<onup>9700</onup>
<ondown>9800</ondown>
<right>15</right>
<bottom>18</bottom>
<width>820</width>
<height>549</height>
<orientation>vertical</orientation>
<itemgap>3</itemgap>
<visible>String.IsEqual(Window(Home).Property(skinshortcuts-Widget),6)</visible>
<control type="button" id="4590">
<description>Enable</description>
<width>100%</width>
<height>66</height>
<include>DefDialogButtonsGradient</include>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<label>126</label>
<label2>$VAR[Enable6]</label2>
<visible allowhiddenfocus="true">String.IsEqual(Window(Home).Property(skinshortcuts-Widget),6)</visible>
<onclick condition="String.IsEmpty(Container(211).ListItem.Property(widgetEnable.6))">SetProperty(customProperty,widgetEnable.6)</onclick>
<onclick condition="String.IsEmpty(Container(211).ListItem.Property(widgetEnable.6))">SetProperty(customValue,yes)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetEnable.6),yes)">SetProperty(customProperty,widgetEnable.6)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetEnable.6),yes)">SetProperty(customValue,no)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetEnable.6),no)">SetProperty(customProperty,widgetEnable.6)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetEnable.6),no)">SetProperty(customValue,yes)</onclick>
<onclick>SendClick(404)</onclick>
</control>
<control type="button" id="4591" description="Widget">
<width>100%</width>
<height>66</height>
<label>$LOCALIZE[31266] 6</label>
<label2>$VAR[LabelWidgetShortcutsName6]</label2>
<onclick>SetProperty(widgetID,6)</onclick>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<include>DefDialogButtonsGradient</include>
<onclick>SendClick(312)</onclick>
</control>
<control type="radiobutton" id="10034" description="Widget Aspect">
<radioposx>760</radioposx>
<selected>String.IsEqual(Container(211).ListItem.Property(widgetFullscreen.6),yes)</selected>
<width>100%</width>
<height>66</height>
<label>$LOCALIZE[37885]</label>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<onclick>SetProperty(customProperty,widgetFullscreen.6)</onclick>
<onclick condition="!String.IsEqual(Container(211).ListItem.Property(widgetFullscreen.6),yes)">SetProperty(customValue,yes)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetFullscreen.6),yes)">SetProperty(customValue,)</onclick>
<onclick>SendClick(404)</onclick>
<include>DefDialogButtonsGradient</include>
<enable>$EXP[HomeIsModernMultiWidgets] | $EXP[HomeIsVerticalMultiWidgets]</enable>
</control>
<control type="button" id="9821" description="Widget Aspect">
<width>100%</width>
<height>66</height>
<label>$LOCALIZE[31261]</label>
<label2>$VAR[LabelWidgetType6]</label2>
<onclick>SetProperty(widgetID,6)</onclick>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<include>DefDialogButtonsGradient</include>
<onclick>SetProperty(customProperty,widgetaspect.6)</onclick>
<onclick condition="String.IsEmpty(Container(211).ListItem.Property(widgetaspect.6)) | String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Poster)">SetProperty(customValue,Square)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Square)">SetProperty(customValue,Fanart)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Fanart) + [$EXP[HomeIsModernMultiWidgets] | $EXP[HomeIsVerticalMultiWidgets]]">SetProperty(customValue,Banner)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Banner) + [$EXP[HomeIsModernMultiWidgets] | $EXP[HomeIsVerticalMultiWidgets]]">SetProperty(customValue,Thumbnail)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Fanart) + !$EXP[HomeIsModernMultiWidgets] + !$EXP[HomeIsVerticalMultiWidgets]">SetProperty(customValue,Thumbnail)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Thumbnail)">SetProperty(customValue,Poster)</onclick>
<onclick>SendClick(404)</onclick>
<enable>!String.IsEqual(Container(211).ListItem.Property(widgettarget.6),system)</enable>
</control>
<control type="radiobutton" id="4592" description="Widget Aspect">
<radioposx>760</radioposx>
<selected>!String.IsEqual(Container(211).ListItem.Property(widgetClearLogoThumb.6),no)</selected>
<width>100%</width>
<height>66</height>
<label>37796</label>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<include>DefDialogButtonsGradient</include>
<visible>String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Thumbnail)</visible>
<onclick>SetProperty(customProperty,widgetClearLogoThumb.6)</onclick>
<onclick condition="!String.IsEqual(Container(211).ListItem.Property(widgetClearLogoThumb.6),no)">SetProperty(customValue,no)</onclick>
<onclick condition="String.IsEqual(Container(211).ListItem.Property(widgetClearLogoThumb.6),no)">SetProperty(customValue,)</onclick>
<onclick>SendClick(404)</onclick>
</control>
<control type="button" id="10005" description="Widget Aspect">
<width>100%</width>
<height>66</height>
<label>37872</label>
<label2>$VAR[LabelAspectRatio6]</label2>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<include>DefDialogButtonsGradient</include>
<visible>String.IsEqual(Container(211).ListItem.Property(widgetaspect.6),Square)</visible>
</control>
<control type="button" id="9802" description="Widget Aspect">
<width>100%</width>
<height>66</height>
<label>581</label>
<label2>$VAR[LabelSortBy6]</label2>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<include>DefDialogButtonsGradient</include>
</control>
<control type="button" id="9803">
<description>Change widget 1 sort order</description>
<width>100%</width>
<height>66</height>
<include>DefDialogButtonsGradient</include>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<label>580</label>
<label2>$VAR[LabelSort6]</label2>
</control>
<control type="button" id="4593">
<description>Enable</description>
<width>100%</width>
<height>66</height>
<include>DefDialogButtonsGradient</include>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<texturenofocus colordiffuse="Black12" border="5">common/box.png</texturenofocus>
<align>left</align>
<enable>[Skin.HasSetting(home.vertical.widgets) | [Skin.HasSetting(home.modernwidgets) + Skin.HasSetting(home.vertical.widgets)]] + !String.IsEqual(Container(211).ListItem.Property(widgetListType),list)</enable>
<label>$LOCALIZE[37790]</label>
<label2>$VAR[AutoScrollTime6]</label2>
<visible>[Skin.HasSetting(home.vertical) + Skin.HasSetting(home.vertical.widgets)] | [Skin.HasSetting(home.modernwidgets) + Skin.HasSetting(home.vertical.widgets)]</visible>
</control>
</control>
With this adding, I can get Widget 6 as below
Now, I am looking for what else to need to work and so far I found one things at skin folder (also need to work more to get widget menu addtionally?)
shortcuts/template.xml
When I am searching as "Widget5"(to referring), I can found
xml:
<!-- InfoSub -->
<control type="group" id="301$SKINSHORTCUTS[id]219">
<visible>[Integer.IsGreater(Container(301$SKINSHORTCUTS[id]1).NumItems,0) | Container(301$SKINSHORTCUTS[id]1).IsUpdating] + [$SKINSHORTCUTS[isfullscreenwidget] | [ !$EXP[Widget2Enabled] + !$EXP[Widget3Enabled] + !$EXP[Widget4Enabled] + !$EXP[Widget5Enabled] ] ]</visible>
...
<!-- InfoSub -->
<control type="group" id="301$SKINSHORTCUTS[id]259">
<visible>$SKINSHORTCUTS[isfullscreenwidget]</visible>
<visible>[Integer.IsGreater(Container(301$SKINSHORTCUTS[id]5).NumItems,0) | Container(301$SKINSHORTCUTS[id]5).IsUpdating] + $EXP[Widget5Enabled]</visible>
...
Finally,Here is my Question.
What does SKINSHORTCUTS[id] number mean?
xml:
<control type="group" id="301$SKINSHORTCUTS[id]219">
<control type="group" id="301$SKINSHORTCUTS[id]259">
How to assign id number to my "NEW Widget 1"? Please help me out.