(2019-09-23, 12:29)QuizKid Wrote: I wrote it all out again and it appears to be working now so I must have made a mistake somewhere I guess. Thanks for looking at this though!
Sorry to revive this, but I thought it was working and it appears it's still not. I'm not sure if I've made a mistake or this method is just too temperamental, but this is the behavior I'm seeing:
Firstly, here is my Flag include. It basically shows an MPAA flag on the right (control 911). If The MPAA texture is missing, another control shows the Studio flag on the right (control 912). If control 912 isn't visible, then it shows a control with the studio flag on the left (control 913).
xml:
<include name="Flags">
<control type="group">
<visible>!Window.IsVisible(contextmenu) + !Control.HasFocus(3000) + !Container.Content(artists) + !String.Contains(ListItem.Icon,Default) + !Skin.String(Flags,disabled) + Skin.String(CommonViewtypeDetails,all)</visible>
<!-- MPAA Flag Right-->
<control type="image" id="911">
<right>0</right>
<bottom>0</bottom>
<width>120</width>
<height>80</height>
<aspectratio>keep</aspectratio>
<texture colordiffuse="$VAR[TextColor]" fallback="flags/blank.png">$VAR[Info_Certificate]</texture>
<visible>[Skin.String(Flags,all) | Skin.String(Flags,rating)]</visible>
</control>
<!-- Studio Flag Right if no MPAA flag-->
<control type="image" id="912">
<right>0</right>
<bottom>0</bottom>
<width>120</width>
<height>80</height>
<aspectratio>keep</aspectratio>
<texture colordiffuse="$VAR[TextColor]" fallback="flags/blank.png">$VAR[Studio_Name]</texture>
<visible>Skin.String(Flags,studio) | Skin.String(Flags,all) + String.IsEqual(Control.GetLabel(911),flags/blank.png)</visible>
</control>
<!-- Sudio Flag Left if Studio Flag Right not visible-->
<control type="image" id="913">
<right>150</right>
<bottom>0</bottom>
<width>120</width>
<height>80</height>
<aspectratio>keep</aspectratio>
<texture colordiffuse="$VAR[TextColor]" fallback="flags/blank.png">$VAR[Studio_Name]</texture>
<visible>Skin.String(Flags,all) + !Control.IsVisible(912)</visible>
</control>
</control>
</include>
This is the behaviour I'm seeing:
1) On Kodi load, if the MPAA and Studio flags are present, they display correctly (MPAA right, Studio left)
2) If the MPAA flag is missing, the studio flag is still showing left instead of right. This is even though the Studio flag on the left is only set to be visible if the Studio flag on the Right is invisible and the studio flag on the right should be visible if the MPAA flag texture is missing.
3. Now things get interesting... I scroll through my views to List view (50). In the first instance (1), things are the same, but in the second instance (2), the Studio flag on the right is now displaying instead:
4. If I go back to the first view, in the first instance, it's now showing both studio and MPAA flags on the right (this shouldn't be possible, as studio flag on the right has a visibility condition that MPAA flag's texture is missing and it's fallenback to blank.png). IN the second instance, the studio flag shows in the right, as would be expected.
At this point, I'm completely stuck...