Conditionnal Visibility when library mode selected ?
#1
Hi,

I would need to hide a control when library mode is selected and show it when the file mode is selected...

Is there any way to do something like :
<visible>SelectedMode(MusicLibrary)</visible>

OR

<visible>!SelectedMode(MusicLibrary)</visible>

Thank you in advance
Reply
#2
<visible>Window.IsVisible(MusicFiles)</visible>
should do the trick :-)
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
ronie Wrote:<visible>Window.IsVisible(MusicFiles)</visible>
should do the trick :-)

Thank you Ronie but I tried and

<visible>!Window.IsVisible(MusicFiles)</visible>
OR
<visible>Window.IsVisible(MusicLibrary)</visible>
do not work either Eek

If you see what I am doing wrong...

Rgs,
Reply
#4
paste the whole control so we can see if there are other conditions mucking it up
Reply
#5
Code:
<control type="button" id="606">
    <description>This button call music library page when audio fullscreen</description>
    <posx>576</posx>
    <posy>2</posy>
    <width>64</width>
    <height>56</height>
    <label>-</label>
    <texturefocus>0PlayerControls-FullScreenNF.png</texturefocus>
    <texturenofocus>0PlayerControls-FullScreenNF.png</texturenofocus>
    [b]<visible>!Window.IsVisible(MusicFiles)+Window.IsActive(504)</visible>[/b]
    <onclick>ActivateWindow(502)</onclick>
</control>
<control type="button" id="607">
    <description>This button call music list page when audio fullscreen</description>
    <posx>576</posx>
    <posy>2</posy>
    <width>64</width>
    <height>56</height>
    <label>-</label>
    <texturefocus>0PlayerControls-FullScreenNF.png</texturefocus>
    <texturenofocus>0PlayerControls-FullScreenNF.png</texturenofocus>
    <visible>Window.IsVisible(MusicFiles)+Window.IsActive(504)</visible>
    <onclick>ActivateWindow(501)</onclick>
</control>

Thank you Jezz_X
Reply
#6
first, which window is 504 ? I see no mention of that one in the wiki
second, put a space in it eg: Window.IsVisible(MusicFiles) + Window.IsActive(504)
third, if 504 isn't a dialog and then they can't both be visible and active at the same time so you need to use | for or

forth, and this one is a personal thing use the English window names not the numbers it makes for better compatibility if it is ever changed in code (does happen) eg <onclick>ActivateWindow(501)</onclick> is nicer as and easier for people like yourself to read as <onclick>ActivateWindow(MusicFiles)</onclick> a list of the names can be found here http://wiki.xbmc.org/?title=Window_IDs
Reply
#7
Jezz_X Wrote:first, which window is 504 ? I see no mention of that one in the wiki
504 is "CustomMusic.xml" (the fullscreen Music OSD with animations)

Jezz_X Wrote:second, put a space in it eg: Window.IsVisible(MusicFiles) + Window.IsActive(504)
Tried but no luck

Jezz_X Wrote:third, if 504 isn't a dialog and then they can't both be visible and active at the same time so you need to use | for or
Yes, this is the reason why I asked originally if something like "<visible>SelectedMode(MusicLibrary)</visible>" exist ?

Jezz_X Wrote:forth, and this one is a personal thing use the English window names not the numbers it makes for better compatibility if it is ever changed in code (does happen) eg <onclick>ActivateWindow(501)</onclick> is nicer as and easier for people like yourself to read as <onclick>ActivateWindow(MusicFiles)</onclick> a list of the names can be found here http://wiki.xbmc.org/?title=Window_IDs
I'll change this, you're right Blush

But I still have no way to hide/show my buttons Sad
Reply

Logout Mark Read Team Forum Stats Members Help
Conditionnal Visibility when library mode selected ?0