2011-09-18, 11:31
I want to allow launching add-ons from the homescreen menu trough user defined shortcuts.
However, the content type can differ per shortcut depending on what add-on is defined as a shortcut. It can be music, video or a program.
So for instance in skin settings I'll have:
But then I would like to use ActivateWindow in the home menu:
This works, even if the user defined add-on is not a video add-on. However it's not correct obviously. Plus, it will screw up my window titles because it will say it's a video add-on when it obviously is not.
Would there be a way to have the window activation be dependant on the type of add-on? Or perhaps something like:
However, the content type can differ per shortcut depending on what add-on is defined as a shortcut. It can be music, video or a program.
So for instance in skin settings I'll have:
PHP Code:
<control type="button" id="217">
<width>557</width>
<label2>[i]$INFO[Skin.String(addonsmenu.addon5.path)][/i]</label2>
<label>-$LOCALIZE[31977]</label>
<onclick>Skin.SetAddOn(addonsmenu.addon5.path,xbmc.python.pluginsource)</onclick>
<enable>Skin.HasSetting(addonsmenu.addon5)</enable>
<visible>Skin.HasSetting(addonsmenu.addon5)</visible>
<include>dialog_Button-list</include>
</control>
But then I would like to use ActivateWindow in the home menu:
PHP Code:
<item id="5">
<label>$INFO[Skin.String(addonsmenu.5.label)]</label>
<onclick>ActivateWindow(Videos,plugin://$INFO[Skin.String(addonsmenu.addon5.path)],return)</onclick>
<visible>Skin.HasSetting(addonsmenu.addon5)</visible>
</item>
This works, even if the user defined add-on is not a video add-on. However it's not correct obviously. Plus, it will screw up my window titles because it will say it's a video add-on when it obviously is not.
Would there be a way to have the window activation be dependant on the type of add-on? Or perhaps something like:
PHP Code:
<onclick>ActivateWindow(Addons,plugin://$INFO[Skin.String(addonsmenu.addon6.path)],return)</onclick>