WindowXML GUI Toolkit (replaces GUIBuilder for XBMC python scripts for GUI coding)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bortoni Offline
Member
Posts: 56
Joined: Jul 2007
Reputation: 0
Post: #166
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.
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #167
@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>

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #168
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

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #169
friendly bump for my previous question

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 176
Post: #170
Would you mind providing a script and/or xml files with it all setup?

* jmarshall is lazy Tongue

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: badge.gif]
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #171
Thanks for the fix JMarshall

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
BigBellyBilly Offline
Skilled Python Coder
Posts: 900
Joined: Feb 2005
Reputation: 2
Location: UK
Post: #172
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

My Addons (myTV, T3CH Upgrader, DVDProfiler, BBCPodRadio, Comics, Football, GoogleReader, reeplay.it, Metacritic, Phonebin, FileViewer,SVN Repo Installer (contributor)) available at Box.net
find quote
borick Offline
Skilled Python Coder
Posts: 69
Joined: Aug 2008
Reputation: 0
Location: Canada
Post: #173
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!
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 9
Location: Sweden
Exclamation   
Post: #174
*NOTICE* Code changes that affect all scripts:
http://forum.xbmc.org/showthread.php?tid=35849

Rolleyes

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.
find quote
borick Offline
Skilled Python Coder
Posts: 69
Joined: Aug 2008
Reputation: 0
Location: Canada
Post: #175
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!!!
find quote
Temhil Offline
Skilled Python Coder
Posts: 397
Joined: Apr 2008
Reputation: 1
Location: Canada
Post: #176
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.

[Image: passionxbmc_signature.png]
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

[Image: project_thin_badge.gif]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 176
Post: #177
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.

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: badge.gif]
find quote
Basje Offline
Skilled Python Coder
Posts: 1,080
Joined: Jul 2005
Reputation: 6
Post: #178
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!

find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #179
i posted one awhile ago. ignored as usual.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
catalytic Offline
Junior Member
Posts: 12
Joined: Dec 2008
Reputation: 0
Post: #180
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.
find quote
Post Reply