Help on Formatting a Dialog Window
#1
I have a script that shows a DialogWindow, that I would like to make a little prettier.  Currently I am using a window.xml file containing a single label to show some text. I update the text as the script runs.

I subclass WindowDialogXML and open the window using:
python:

class SkipItWindow(xbmcgui.WindowXMLDialog):
.
.
ui = SkipItWindow('skipitwindow.xml', CWD, 'default', '1080i')

This shows my label as transparent over the underlying video, which is fine, but I would like to centre the label and give the it a light transparent background to improve readability, if possible.  Any help would be appreciated.
Reply
#2
You'll need to post your skipitwindow.xml file, that's where all the magic happens.
Reply
#3
This is the xml
xml:

<window id="1191" type="dialog">
    <coordinates>
       <left>500</left>
       <top>40</top>
    </coordinates>
    <controls>
        <control type="group" id="15">
            <left>10</left>
            <top>10</top>
            <width>auto</width>
            <colordiffuse>grey</colordiffuse>
            <control type="label" id="1">
                <description>Skip info</description>
                <left>10</left>
                <top>10</top>
                <width>auto</width>
                <visible>true</visible>
                <align>center</align>
                <aligny>center</aligny>
                <scroll>false</scroll>
                <label>Skipping >> 300</label>
                <haspath>false</haspath>
                <font>font14</font>
                <textcolor>ff7790c7</textcolor>
                <shadowcolor>ff3f3f3f</shadowcolor>
                <wrapmultiline>false</wrapmultiline>
                <scrollspeed>50</scrollspeed>
                <scrollsuffix> - </scrollsuffix>
              </control>
          </control>
    </controls>
</window>
Reply
#4
As far as I know you can't use colordiffuse in a group.

What I would do is use a texture. Add a media directory next to your xml directory that contains a small , maybe 16x16 pixel png file filled with the colour white. Then use a texture like so:-

xml:
<window id="1191" type="dialog">
  <coordinates>
    <left>500</left>
    <top>40</top>
  </coordinates>

  <controls>
    <control type="group" id="15">
      <left>10</left>
      <top>10</top>
      <width>200</width>
      <height>60</height>

      <control type="texture">
        <texture colordiffuse="grey">WHAT_EVER_YOU_CALLED_YOUR_PNG.png</teuxtre>
      </control>

      <control type="label" id="1">
        <description>YOUR ORIGINAL LABEL HERE</description>
      </control>

    </control>

  </controls>
</window>

You could also use a button instead of the texture and label, by setting the focuse and nofocus texture to the same image.
Reply

Logout Mark Read Team Forum Stats Members Help
Help on Formatting a Dialog Window0