Kodi Community Forum

Full Version: Custom Dialogue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I would like to know if there is a way i can make a custom dialogue box that opens when you click on it from a shortcut in the skin and gives me the option of 2 addons to open then i can select one.
For example lets say you click radio it will then open a box in the center of the screen asking which addon you would like to open for radio.
Just wondering how I would go about this?

Thanks for any help, much appreciated.
yup, it's possible to add custom dialogs to a skin.
see: http://kodi.wiki/view/Skinning_Manual#Ad...ra_Windows

here's an example of a custom dialog i use to run several addons:
https://github.com/ronie/skin.transparen...Extras.xml

depending on the type of addon you want to run (plugin or script) you may need to change onclick defenitions
to ActivateWindow() instead of RunScript().
Ok thanks for the help I will try to work on it now Smile
I am trying to use the <onclick> thing to make the addon open when I click it but I am a little confused, what should I change this to?
<onload condition="System.HasAddon(script.videoextras)">RunScript(script.videoextras,check,"$INFO[ListItem.FilenameAndPath]")</onload>

Should it be:
<onclick >RunScript(
and I am not sure about the rest.
as said, it depends on if the addon you want to run is a script or a plugin.

for scripts, use:
RunScript(script.id)

for plugins:
ActivateWindow(videos,plugin://plugin.id)
Ok and if i wanted to run the xml file in kodi how would i do it.
In super favorites there is a way to add a favorite manually and it says enter a name and enter a command, could in do it this way?
(2016-07-01, 19:22)nath183 Wrote: [ -> ]Ok and if i wanted to run the xml file in kodi how would i do it.

it's explained in the wiki article i linked to:
To activate your window, you can do it by adding a button control elsewhere in the skin, or you can get it to popup on a press of the controller or remote via keymap.xml and so on. Basically you just need to run ActivateWindow(id) from a suitable place.


(2016-07-01, 19:22)nath183 Wrote: [ -> ]In super favorites there is a way to add a favorite manually and it says enter a name and enter a command, could in do it this way?

no idea, i'm not familiar with that addon.