Conditional Animation - Home and DialogButtonMenu.xml
#1
I want to position the 'Press S' dialog based on what is focused on Home.

This is what I think would work, this is inside a <group> in DialogButtonMenu.xml:
PHP Code:
<animation effect="slide" start="0,0" end="-500" time="0" condition="Window.IsActive(Home) + Container(9000).Column(0)">Conditional</animation

That doesn't work, my guess is that inside the dialog it has no clue what Container(9000) is. Am I wrong or is there another way? Thx...
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#2
i would add a Skin.SetString() to all the focusable controls in Home.xml:
Code:
<onfocus>Skin.SetString(Foo,1)</onfocus>

and test for that in DialogButtonMenu.xml:
Code:
<animation effect="slide" start="0,0" end="-500" time="0" condition="Window.IsActive(Home) + Skin.String(Foo,1)">Conditional</animation>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Thx for the reply, finally had time to try this out. Did you mean like so:

Quote:<item id="1">
<description>music</description>
<label>2</label>
<icon>backgrounds/music.jpg</icon>
<thumb>$INFO[Skin.String(CustomMusicFolder)]</thumb>
<onclick>XBMC.ActivateWindow(MyMusic,return)</onclick>
<onfocus>Skin.SetString(Foo,1)</onfocus>
<visible>!Skin.HasSetting(HomeMenuNoMusicButton)</visible>
</item>

If yes, that didn't work...
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#4
looks like onfocus does not work inside static lists...
too bad, can't think of any other way atm.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
perhaps with
Container(9000).HasFocus(1) ?
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#6
thx for the replies but so far all suggestions are striking out...
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#7
you could try if Control.GetLabel can be used in this case, but i've never had much luck in getting it to work myself...

anyway, test with something like this:
<animation effect="slide" start="0,0" end="-500" time="0" condition="stringcompare(Control.GetLabel(0,9000),$LOCALIZE[2]">Conditional</animation>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
Conditional Animation - Home and DialogButtonMenu.xml0