Previously I have had no trouble having a default image appear for my flagging when there isn't an icon to represent it. Lately I switch a few flags to use this...
<control type="image">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>defaultscreen.png</texture>
<visible>!Control.IsVisible(89)</visible>
</control>
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
</control>
The default image will not show with this coding. can anyone shine some light on what I am missing.
I have 720, 540, 1080 as my icons.
<texture fallback="foo">bar</texture>
Not sure if it's of any help, but here's some related
info.
And a
Trac Ticket for it.
ekim232 Wrote:Previously I have had no trouble having a default image appear for my flagging when there isn't an icon to represent it. Lately I switch a few flags to use this...
<control type="image">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>defaultscreen.png</texture>
<visible>!Control.IsVisible(89)</visible>
</control>
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
</control>
The default image will not show with this coding. can anyone shine some light on what I am missing.
I have 720, 540, 1080 as my icons.
I guess the code doesn't work because control '89' is always visible ?
Try this:
Code:
<control type="image">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>defaultscreen.png</texture>
<visible>!Control.IsVisible(89)</visible>
</control>
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
[b]<visible>!IsEmpty(ListItem.VideoResolution)</visible>[/b]
</control>
because its only in very rare cases that "ListItem.VideoResolution" will be empty just because you don't have a graphic for it doesn't mean its empty
what you want is this (just 1 control)
Code:
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture fallback="defaultscreen.png">$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
</control>
At least in thoery
Jezz_X Wrote:because its only in very rare cases that "ListItem.VideoResolution" will be empty just because you don't have a graphic for it doesn't mean its empty
what you want is this (just 1 control)
Code:
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture fallback="defaultscreen.png">$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
</control>
At least in thoery
correct, in theory it should work, but in real life it doesn't ;-)
problem is $INFO[ListItem.VideoResolution,videoresolution,.png] will never return empty.
even if ListItem.VideoResolution is empty, INFO[ListItem.VideoResolution,videoresolution,.png] will still return 'videoresolution.png'
so it never loads the fallback image.
Thanks for the suggestions. I tried yours Ronie and it was a no go. It all seems like it should work, but I guess I will have to wait for the trac ticket to be filled. For me it is not a big deal to add seperate image controls for sound, video, & codecs to have a fallback image....but for studios I think a single coding is great where it matched the names, but the drawback is the empty space with no fallback.
ekim232 Wrote:Thanks for the suggestions. I tried yours Ronie and it was a no go. It all seems like it should work, but I guess I will have to wait for the trac ticket to be filled. For me it is not a big deal to add seperate image controls for sound, video, & codecs to have a fallback image....but for studios I think a single coding is great where it matched the names, but the drawback is the empty space with no fallback.
Sorry, i didn't test it myself. Anyway, maybe this would work:
Code:
<control type="image">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>defaultscreen.png</texture>
[b] <visible>IsEmpty(ListItem.VideoResolution)</visible>[/b]
</control>
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
[b] <visible>!IsEmpty(ListItem.VideoResolution)</visible>[/b]
</control>
have a play with this code in theory
it will work
Code:
<control type="image">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>defaultscreen.png</texture>
<visible>!stringcompare(ListItem.VideoResolution,1080)+!stringcompare(ListItem.VideoResolution,720)+!stringcompare(ListItem.VideoResolution,540)</visible>
</control>
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
<visible>stringcompare(ListItem.VideoResolution,1080)|stringcompare(ListItem.VideoResolution,720)|stringcompare(ListItem.VideoResolution,540)</visible>
</control>