Kodi Community Forum
WindowXML GUI Toolkit (replaces GUIBuilder for XBMC python scripts for GUI coding) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: WindowXML GUI Toolkit (replaces GUIBuilder for XBMC python scripts for GUI coding) (/showthread.php?tid=24839)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


- bortoni - 2007-08-20

I have a small question. I'm looking at the WindowXMLExample that is in svn. I want to be able to have second label in a list but have it invisible. In the #xbmc-scripts channel I was given the suggestion that I could use the <visible> tag to do this. However, in the sample script above, I can't find anywhere in the XML file for it where list items are described.

Where could I make this change? As I mentioned, I'm learning with the example so if anyone can provide a response based on it I'd really appreciate it.

Thanks.


- Nuka1195 - 2007-08-21

@chunk1970, checkout the new setInfo() method added to the listitem

@bortoni, make label2 <visible>false<visible> that was taken from amt credits xml file, there should be plenty of examples in that script.

Code:
<control type="list" id="101">
   <description>Team Credits List</description>
   <posx>33</posx>
   <posy>100</posy>
   <width>360</width>
   <height>60</height>
   <scrolltime>200</scrolltime>
   <itemlayout height="20">
    <control type="label">
     <posx>3</posx>
     <posy>1</posy>
     <width>200</width>
     <height>18</height>
     <font>font10</font>
     <aligny>center</aligny>
     <align>left</align>
     <info>ListItem.Label</info>
    </control>
    <control type="label">
     <posx>335</posx>
     <posy>1</posy>
     <width>150</width>
     <height>18</height>
     <font>font10</font>
     <aligny>center</aligny>
     <align>right</align>
     <info>ListItem.Label2</info>
    </control>
   </itemlayout>
   <focusedlayout height="20">
    <control type="label">
     <posx>3</posx>
     <posy>1</posy>
     <width>200</width>
     <height>18</height>
     <font>font10</font>
     <aligny>center</aligny>
     <align>left</align>
     <info>ListItem.Label</info>
    </control>
    <control type="label">
     <posx>335</posx>
     <posy>1</posy>
     <width>150</width>
     <height>18</height>
     <font>font10</font>
     <aligny>center</aligny>
     <align>right</align>
     <info>ListItem.Label2</info>
    </control>
   </focusedlayout>
  </control>



- Nuka1195 - 2007-09-16

Code:
<animation effect="rotate" center="128,128" start="0" end="-360" time="60000" loop="true" condition="Control.IsVisible(100)">Conditional</animation>

The above animation works with a WindowXML, but does not work with WindowXMLDialog. Can anything be done to fix this?

I know WindowClose animations won't work with dialogs, but this one would be helpful.

Thanks


- Nuka1195 - 2007-09-17

friendly bump for my previous question


- jmarshall - 2007-09-17

Would you mind providing a script and/or xml files with it all setup?

* jmarshall is lazy :p


- Nuka1195 - 2007-09-18

Thanks for the fix JMarshall


- BigBellyBilly - 2008-02-29

Somtime ago in this thread, Basje posted a question about the lookup order that's used to find an image, but I didn't see an answer in reply.

My question is simliar;

Can/Does/Could WindowXML fallback to lookup images in the Default media folder if
not in <current skin name>/media folder ?
That way there wouldn't be a need to include duplicate images that are common to several skins, in every skin media folder.

If there's a way to get it to behave like that, please tell me ?

Thanks
BBB


- borick - 2008-08-29

Regarding the built in lists in WindowXML...

- When I use an icon image, and I specify path to the image, it works. When I delete the list item, and recreate the image file, then specify path to same image file, the image shown is same as last time, i.e. the image doens't refresh to the new image. At least, this behaviour occured in builds previous to 08-25 by T3CH. On the T3CH 08-25 build this behaviour was somewhat rectified. Can anyone confirm or deny this behavior?

- I get memory problems, out of buffer memory errors when using WindowXML in conjunction with a list container containing thumbnail images. I didn't receive the same errors using a list control under guibuilder.py. Confirm or deny?

Thanks!


- Gamester17 - 2008-08-29

*NOTICE* Code changes that affect all scripts:
http://forum.xbmc.org/showthread.php?tid=35849

Rolleyes


- borick - 2008-08-30

Ok i discover the true source of the problem causing my memory errors. I had too much work being done in OnInit which shouldnt be there.

Do not put any cpu intensive code in onInit! Keep it fast!!!


Issue with mouse click on Windows/Mac - Temhil - 2008-12-18

Hi Guys,

I am pretty new using WindowXML (I was using the old API before for doing script GUI, but WindowXML is 100 time more powerful!) and I have notice a weird thing at least on Window (and Mac too) platform when I use a mouse.

If with my mouse I click on a button, that works, nice!
BUT, if I try to do the same with a list item, nothing happens, I need to press Enter.
Selection of the item works, but not the mouse click.

I tried to capture the mouse event in the OnAction methose using code from key.h
ACTION_MOUSE 90
ACTION_MOUSE_CLICK 100
ACTION_MOUSE_LEFT_CLICK 100
ACTION_MOUSE_RIGHT_CLICK 101
ACTION_MOUSE_MIDDLE_CLICK 102

And the only one i can capture is 90 (mouse mouvement so), but Mouse click, nothing.

It is anoying since the user on windows can not click on an item on a list with only the mouse, he needs to use the keyboard.

Do you have any idea, why it is like that? Or what am I doing wrong?

Thanks in advance for your help.


- jmarshall - 2008-12-18

Sounds like they're not being passed on from the XBMC side. Post a trac ticket about it including the exact actions you wish to be able to pick up and so on.


- Basje - 2008-12-18

jmarshall Wrote:Sounds like they're not being passed on from the XBMC side. Post a trac ticket about it including the exact actions you wish to be able to pick up and so on.

If this could be done, it would be awsome!


- Nuka1195 - 2008-12-19

i posted one awhile ago. ignored as usual.


- catalytic - 2008-12-19

Hi,

I have started playing with XBMC only a few days back. So, please excuse me if following seem too dumb a question ( I too have a feeling that I am missing something obvious here):

I did not find an API for adding listitems to a specific list. So, in a window that has more than one list with id outside 50-60 range, how is the "window list" determined?

Is there a way to update such lists in any way?

Any inputs would be much appreciated.

Thanks much in advance.