Kodi Community Forum
Skining Dialogs Help - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Skining Dialogs Help (/showthread.php?tid=125034)



Skining Dialogs Help - ekim232 - 2012-03-08

Does anyone have any good tricks to skin dialogs. For the vast majority of them I have to go into a certain windows and go through several clicks and windows just to skin what is usually a easy panel or list.

Can dialogs be launch through keymap commands.

ie. <F10>xbmc.activatewindow(dialogyesno.xml)</F10>

I would love ths feature because I could sit on a window and quickly launch any dialog to see what changes I need to make and not have to go through the motions of having xbmc launch the dialog through day to day use.

I think anyone who has made a skin can agree that a project can quickly become boring when it comes time to do the dialogs. Just wanted to see if anyone had any good suggestions. Thanks.


- el_Paraguayo - 2012-03-08

Other than navigating to a particular window where you know the dialog would be invoked, I'd be inclined to knock up a small script that triggers the necessary dialog (e.g. YesNo, DiaolgProgress etc), and map it to a key.

That's just me, and I've been known to over-engineer solutions before!


- ekim232 - 2012-03-08

Does anyone know if it possible to just create a button on home.xml to trigger whatever dialog you want.

ie. <onclick>activatewindow(diaglogyesno.xml)</onclick>

I am not sure if all diaglogs can be launch from anywhere in the skin or if they must be done from a certain window.


- pecinko - 2012-03-08

ekim232 Wrote:Does anyone know if it possible to just create a button on home.xml to trigger whatever dialog you want.

ie. <onclick>activatewindow(diaglogyesno.xml)</onclick>

I am not sure if all diaglogs can be launch from anywhere in the skin or if they must be done from a certain window.

Some of them yes. Most of them, unfortunately, no.

Don't remember which of them does open and which are problematic ones, sorry. If it helps, those that can activate are mappable in keymap.


- Hitcher - 2012-03-08

Just stick it your keymap.xml.

PHP Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keymap>
    <global>
        <keyboard>
            <f1>ActivateWindow(virtualkeyboard)</f1>
            <F3>XBMC.UpdateLibrary(Video)</F3>
            <F4>XBMC.UpdateLibrary(Music)</F4>
            <F5>XBMC.ReloadSkin()</F5>
            <F6>Skin.ToggleSetting(DebugGrid)</F6>
            <F7>Skin.ToggleSetting(HideDebugInfo)</F7>
            <F8>Notification(Testing 123,Hello world)</F8>
        </keyboard>
    </global>
</keymap> 

Although you wont see a lot of the default labels or content.


- el_Paraguayo - 2012-03-09

Hitcher,

I agree, those are esential shortcuts for those of us who like to mod skins. Nod

However, there's no shortcut to the other Dialogs, e.g. YesNo that Ekim was asking about.

I'm not aware of a quick way to trigger those dialogs, hence my comment about using a script to call them.

el_P


- Hitcher - 2012-03-09

Just use <f1>ActivateWindow(yesnodialog)</f1>


- Balinus - 2012-03-09

Hitcher Wrote:Just stick it your keymap.xml.

PHP Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keymap>
    <global>
        <keyboard>
            <f1>ActivateWindow(virtualkeyboard)</f1>
            <F3>XBMC.UpdateLibrary(Video)</F3>
            <F4>XBMC.UpdateLibrary(Music)</F4>
            <F5>XBMC.ReloadSkin()</F5>
            <F6>Skin.ToggleSetting(DebugGrid)</F6>
            <F7>Skin.ToggleSetting(HideDebugInfo)</F7>
            <F8>Notification(Testing 123,Hello world)</F8>
        </keyboard>
</keymap> 

Although you wont see a lot of the default labels or content.

There's a </global> missing I think ?


- Hitcher - 2012-03-09

Opps, fixed.


- ekim232 - 2012-03-09

Hitcher Wrote:Just use <f1>ActivateWindow(yesnodialog)</f1>

How many dialogs do you think this action can cover? How many can be launched from the home menu? That was my whole dream was to just sit in the home screen and launch dialogs so I could quickly tweak them. I do use your same keymap, and it was great day for me when you posted that awhile back for the skin.reload feature.


- Hitcher - 2012-03-09

Just try them and see. You'll probably have to remove the default IDs and enter some text in most things though.


- el_Paraguayo - 2012-03-10

Hitcher Wrote:Just try them and see. You'll probably have to remove the default IDs and enter some text in most things though.

Ah, this is what I meant. I wasn't sure how the activatewindow command generate text fire the dialogs. Never thought about hard-coding some.

Told you I always missed obvious solutions!

Thanks Hitcher.