PDA

View Full Version : Conditional animation with xml name as condition.


Nuka1195
2007-06-25, 18:35
Hi,

I'm trying to position a control based on if the previous window is a specific window.

<control type="image" id="1">
<description>Background Image</description>
<posx>50</posx>
<posy>40</posy>
<width>300</width>
<height>320</height>
<texture>default-dialog-panel.png</texture>
<animation effect="slide" time="0" start="50,40" end="200,0" conditional="Window.Previous(script-XBMC_Lyrics-main.xml)">Conditional</animation>
</control>

Is this possible?

I'm using this with python and WindowXML.

Thanks

Edit: the following does not work in the skin, MyScripts.xml. Should Window conditions be acceptable conditions?
<control type="image">
<description>background image</description>
<posx>0</posx>
<posy>0</posy>
<width>720</width>
<height>88</height>
<texture>background-apps.png</texture>
<animation effect="slide" time="0" end="500,0" conditional="Window.IsVisible(20)">Conditional</animation>

jmarshall
2007-06-26, 02:19
Try condition= instead of conditional=

Both of them *should* work fine.

Nuka1195
2007-06-26, 03:41
:) thanks

Nuka1195
2007-06-26, 06:10
It may be a python/windowxml thing or a dialog thing?

I call one dialog from another dialog.

I had to use:
<animation effect="slide" time="0" end="90,0" condition="!Window.IsVisible(script-XBMC_Lyrics-settings.xml)">Conditional</animation>

The Previous didn't work. Should it?

Putting this in Dialogfavorites.xml does not work and when I close the favorites menu XBMC_PC crashes.
<animation effect="slide" time="0" end="-190,0" condition="Window.Previous(home.xml)">Conditional</animation>

if it helps
23:12:20 M:189632512 INFO: Loading skin file: DialogFavourites.xml
23:12:22 M:189632512 DEBUG: CApplication::OnKey: 61467 pressed, action is 10
23:12:22 M:190607360 FATAL: EXCEPTION_ACCESS_VIOLATION (0xc0000005)
at 0x00537d69


Thanks for finding my mistake JMarshall.