2009-09-08, 20:35
2009-09-08, 21:44
Something like this?
Was added here I believe: http://xbmc.svn.sourceforge.net/viewvc/x...sion=21336
Code:
<texture fallback="Default_icon.png">$INFO
[ListItem.Label,,_icon.png]</texture>
Was added here I believe: http://xbmc.svn.sourceforge.net/viewvc/x...sion=21336
2009-09-08, 22:10
note, you can only fallback to a 'static' image and not to an $INFO string:
http://forum.xbmc.org/showthread.php?tid...t=fallback
http://forum.xbmc.org/showthread.php?tid...t=fallback
2009-09-09, 02:02
XBMCG33K Wrote:Something like this?
Code:<texture fallback="Default_icon.png">$INFO
[ListItem.Label,,_icon.png]</texture>
Was added here I believe: http://xbmc.svn.sourceforge.net/viewvc/x...sion=21336
Nope.
I want to display an image and if the image doesn't exist, i want to display text.
Is there a boolean condition called IfExist?
I was thinking to just display the text and display the picture on top of it and
use IfExist on the filename for the visibility of the text.
-Pr.
2009-09-09, 03:00
Putting a label under the image seems the simplest technique. If the image isn't there, you'll see the label. If it is, you won't.
2009-09-09, 03:32
jmarshall Wrote:Putting a label under the image seems the simplest technique. If the image isn't there, you'll see the label. If it is, you won't.
Ya but i am afraid that some text might be too long to be completely hidden
by the image. The text is not static since it is called by $INFO[VideoPlayer.TVShowTitle]
-Pr.
2009-09-09, 03:56
Use the <width> of the label to ensure that?
2009-09-09, 04:18
jmarshall Wrote:Use the <width> of the label to ensure that?
Yeah i will try that and see how it looks...
Anyway, the images i want to display (TV Banners) are fairly easy to get so
hopefully the text label will never be seen...
-Pr.
2009-09-09, 08:32
Pr.Sinister Wrote:Nope.
I want to display an image and if the image doesn't exist, i want to display text.
Is there a boolean condition called IfExist?
I was thinking to just display the text and display the picture on top of it and
use IfExist on the filename for the visibility of the text.
-Pr.
you may want to check the code in PM3.HD
it uses a similar technique to display a text string when no episode thumb is available. (in fanart view)
2009-09-19, 22:54
I tried the technique but this will only work if the image isn't using transparency. Any other ideas on how to handle this?
2009-09-19, 23:05
if you can come up with some kind of visible condition for the image, this may work:
[HTML]<control type="label">
...
<visible>!Control.IsVisible(1234)</visible>
</control>
<control type="image" id="1234">
...
<visible>!IsEmpty(foo)</visible>
</control>[/HTML]
[HTML]<control type="label">
...
<visible>!Control.IsVisible(1234)</visible>
</control>
<control type="image" id="1234">
...
<visible>!IsEmpty(foo)</visible>
</control>[/HTML]
2009-09-20, 00:20
Unfortunately I can't. I'm trying to display a studio logo if available and just display the studio name as a label if not. So Listitem.studio is always set (can't use IsEmpty) but <texture> can fail if the image isn't available. Any ideas? It would be helpful if visible was set to false if <texture> fails and no fallback is available or if the fallback fails as well.
2009-09-20, 02:32
How about setting the fallback for the image to a texture that doesn't exist (or is transparent) but has a unique name?
Then you might be able to use Control.GetLabel() or whatever it is perhaps?
Then you might be able to use Control.GetLabel() or whatever it is perhaps?