Migrating an addon from Kodi 16 - 17 (Confluence -> Estuary)
#1
I originally posted in addon development but it was suggested that it may be more relevant here.

I have a script addon that functions perfectly under Kodi 15 and 16. It uses WindowXMLDialog to create and populate a dialog. However on Kodi 17 I see this

https://www.dropbox.com/s/yyqsmz0koytyhc....23.05.png

What you see there, is basically the content of my dialog, not displayed in a dialog.

Now, I'm not a great expert in Kodi programming (and I have to say I've found much of the doc. confusing, contradictory and outdated). But I have been using the following fragment at the top of my XML ( in resources/Default/720p/dialog.xml ) as follows

PHP Code:
<window id="1100" type="dialog">
    <
zorder>0</zorder>
    <
coordinates>
        <
system>1</system>
        <
posx>120</posx>
        <
posy>100</posy>
    </
coordinates>
    <include>
dialogeffect</include>
    <
depth>DepthDialog+</depth>
    <
defaultcontrol always="true">300</defaultcontrol>
    <
controls>
        <include 
name="DialogBackgroundCommons">
            <
param name="DialogBackgroundWidth" value="650"/>
            <
param name="DialogBackgroundHeight" value="600"/>
            <
param name="DialogHeaderWidth" value="570"/>
            <
param name="DialogHeaderLabel" value="$ADDON[script.service.unblockr 32020]"/>
            <!--<
param name="DialogHeaderId" value="1" />-->
            <
param name="CloseButtonLeft" value="560"/>
            <
param name="CloseButtonNav" value="9000"/>
        </include>
        <!--
Title-->
        <
control type="textbox" id="200">
            <
posx>20</posx>
            <
posy>70</posy>
            <
width>610</width>
            <
height>150</height>
            <
font>font13</font>
            <
textcolor>FFFFFFFF</textcolor>
            <
label>$ADDON[script.service.unblockr 32013]</label>
        </
control

etc.

I suspect (but havent proven) that the includes are failing on Estuary. I confess the include set was cribbed without genuinely understanding why - although I subsequently understand that they're defined in Confluence's 'includes.xml'. As a non-skinner and artistic muppet, is there any way I can leverage the 'current' skin styling so as to

  1. Work with multiple skins and fit in with the skin style/settings
  2. Avoid having to carry / implement all the visual attributes and deal with skin changes smoothly.
Reply
#2
answer to 1 & 2 is both nope. it's not possible for addons to adopt the look and feel of whatever skin it's used on.
you can (and most do) design your dialog to match the estuary skin though.
when a user select a different skin, your dialog will still have the estuary 'style' (exact for font sizes in many cases).


some basic guidelines for script skins:
- don't use includes (and params), those are skin specific and will not work with any other skin.
- don't use constants (e.g. DepthDialog+ in your case), these are also skin specific.
- include all needed graphics in your addon itself. don't expect evry skin to have a dialog.png or button.png image, image names vary across skins.
- keep in mind font names are also skin specific, it's ok to use the ones defined in the default skin tough
- don't use skins specific color names. it's sfest to use hex values (as you already have in your example).
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Thanks ronie. I've been investigating PyXBMCt which seems to hold promise. As I indicated, I'm rubbish with anytyhing artistic and some kind of common include set for all skins would make simple dialog design a lot easier.
Reply
#4
I'm not sure what the rest of your script is like, but if you are just displaying a textbox then you can use the xbmcgui module to call builtin dialogs (e.g. the ok dialog or the text viewer dialog).

e.g.
PHP Code:
import xbmcgui
dialog 
xbmcgui.Dialog()
confirm dialog.yesno('Header''Are you sure?''This will do ACTION.''Click OK to confirm.''CANCEL''OK')
if 
confirm:
    
textviewer dialog.textviewer('Header''Whole bunch of text'
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply

Logout Mark Read Team Forum Stats Members Help
Migrating an addon from Kodi 16 - 17 (Confluence -> Estuary)0