2019-08-26, 01:11
Apologies if this is a basic question or has been answered before. I'm beginner level and have tried searching for help, but I'm going wrong somewhere. I'm trying to reverse engineer bits of code from different skins to get the desired result.
I think what I'm trying to achieve is this: 272579 (thread)
I have a $VAR that is populated with the location of various MPAA rating flags. If it is empty (i.e. if there is no flag being shown), I want to change the visibility of a different control.
I have tried adding a hidden label control with an arbitrary ID showing the $VAR with a fallback "EMPTY". My code is in includes.xml:
Thanks in advance
I think what I'm trying to achieve is this: 272579 (thread)
I have a $VAR that is populated with the location of various MPAA rating flags. If it is empty (i.e. if there is no flag being shown), I want to change the visibility of a different control.
I have tried adding a hidden label control with an arbitrary ID showing the $VAR with a fallback "EMPTY". My code is in includes.xml:
Quote: <control type="label" id="78600">Next, I tried to use a String.IsEqual comparison of this hidden label with the fallback value "EMPTY" to use as a visibility condition on a different control when the $VAR doesn't have a value. This second control is situated in the same <include>:
<font>list_focused</font>
<visible>false</visible>
<label fallback="EMPTY">$VAR[Info_Certificate]</label>
</control>
Quote: <control type="image">I've also tried String.IsEmpty(Control.GetLabel(78600)) but neither of these are working. Does anyone have nay ideas where I'm going wrong?
<right>150</right>
<bottom>0</bottom>
<width>120</width>
<height>80</height>
<aspectratio>keep</aspectratio>
<texture colordiffuse="$VAR[TextColor]" fallback="">$INFO[ListItem.Studio,flags/studios/,.png]</texture>
<visible>!String.Contains(ListItem.Icon,Default) + !Container.Content(artists) + String.IsEqual(Control.GetLabel(78600),EMPTY)</visible>
</control>
Thanks in advance