Can't get a dialog to pop up.
#1
I am having a bit of trouble mucking about with a skin (just learning the ropes) and was wondering if someone could help me out Smile

I can't seam to get this dialog (720p/custom-12345.xml) to pop up when I press the button.

Code:
window id="12345" type="dialog">
  <defaultcontrol>2</defaultcontrol>
  <allowoverlay>yes</allowoverlay>
  <visible>true</visible>
  <coordinates>
   <system>1</system>
        <posx>-160</posx>
        <posy>0</posy>
  </coordinates>
  <controls>

        <control type="label" id="1">
            <description>My First label</description>
            <posx>180</posx>
            <posy>160</posy>
            <width>250</width>
            <visible>true</visible>
            <align>center</align>
            <aligny>center</aligny>
            <scroll>false</scroll>
            <label>My First label</label>
            <font>font14</font>
            <number>-</number>
            <angle>-0</angle>
            <haspath>false</haspath>
            <textcolor>FFB2D4F5</textcolor>
            <shadowcolor>ff000000</shadowcolor>
            <wrapmultiline>false</wrapmultiline>
            <scrollspeed>50</scrollspeed>
            <scrollsuffix>-</scrollsuffix>
        </control>
        
  </controls>
</controls>
  </window>

Button shows the image when focused but nothing happens

Code:
    <control type="button">  
                    <posx>977</posx>
                    <posy>455</posy>
                    <width>150</width>
                    <height>150</height>
                    <label>-</label>
                    <font>-</font>
                    <texturefocus>test6.png</texturefocus>
                    <texturenofocus>blank.png</texturenofocus>                        
                    <onclick>ActivateWindow(custom-12345)</onclick>
                    <visible>Control.IsVisible(460)</visible>                    
                </control>
I have tried
<onclick>ActivateWindow(12345)</onclick>
<onclick>ActivateWindow(custom-12345)</onclick>
<onclick>XBMC.ActivateWindow(12345)</onclick>
<onclick>XBMC.ActivateWindow(custom-12345)</onclick>

What have I done wrong?

Thanks for helping Smile
Reply
#2
Does the Debug Log show any issues loading the custom window or any response when pushing the button?

I'm assuming your XML above is copy n pasted wrong, as there's a few issues with it (try loading it into a browser to verify it).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
use a 4 digit window id, eg "1234"
ActivateWindow(1234) is the correct function to open custom windows.
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
#4
... and by the way you have 2 </controls> at the end of your custom dialog window, delete one.
Reply
#5
Yes it was just cut and pasted, actual code was ok
The 4 digit id, ActivateWindow(1234) worked Smile
Thanks for your help Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Can't get a dialog to pop up.0