Kodi Community Forum
Conditional animation with xml name as condition. - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Conditional animation with xml name as condition. (/showthread.php?tid=27006)



Conditional animation with xml name as condition. - Nuka1195 - 2007-06-25

Hi,

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

Code:
<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?
Quote: <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

Try condition= instead of conditional=

Both of them *should* work fine.


- Nuka1195 - 2007-06-26

Smile thanks


- Nuka1195 - 2007-06-26

It may be a python/windowxml thing or a dialog thing?

I call one dialog from another dialog.

I had to use:
Code:
<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.
Code:
<animation effect="slide" time="0" end="-190,0" condition="Window.Previous(home.xml)">Conditional</animation>

if it helps
Quote: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.