2011-08-08, 15:54
Hi guys! I'm building a skin and want some other weather icons than the default ones. Would it be possible to use customs? If yes, what do i have to do?
Thanks!
Thanks!
<icon>$INFO[Weather.FanartCode,NAME_OF_WEATHER_ICON_FOLDER/,.png]</icon>
Hitcher Wrote:Put then in a separate folder in your media folder and label them the same as the default XBMC ones, then use something like this for your code -
PHP Code:<icon>$INFO[Weather.FanartCode,NAME_OF_WEATHER_ICON_FOLDER/,.png]</icon>
Hitcher Wrote:And what happens if you remove your code?
<!-- weather info -->
<control type="group">
<posx>0</posx>
<posy>0</posy>
<icon>$INFO[Weather.FanartCode,weathericons/,.png</icon>
<visible>!Skin.HasSetting(homepageWeatherinfo) + Weather.IsFetched</visible>
<!-- weather conditions current -->
<control type="image">
<posx>40</posx>
<posy>7</posy>
<width>80</width>
<height>80</height>
<aspectratio>keep</aspectratio>
<texture>$INFO[Weather.Conditions]</texture>
</control>
<control type="image">
<posx>0</posx>
<posy>0</posy>
<width>80</width>
<height>80</height>
<aspectratio>keep</aspectratio>
<texture>$INFO[Weather.FanartCode,weathericons/,.png]</texture>
</control>
`Black Wrote:There are many mistakes in that code...
1. <icon> attribute is only available for list items (I think).
2. You need an image control
3. You need a texture instead of the icon attribute
4. You should specify width & height of the image in your image control
5. Your $INFO is missing a ] at the end.
Try this
Code:<control type="image">
<posx>0</posx>
<posy>0</posy>
<width>80</width>
<height>80</height>
<aspectratio>keep</aspectratio>
<texture>$INFO[Weather.FanartCode,weathericons/,.png]</texture>
</control>
Adjust x,y,width & height and you're done.
`Black Wrote:There are many mistakes in that code...I know I didn't originally ask about this but I wanted to say thank you anyway since I had been trying to figure this out for a while too. So... Thanks.
1. <icon> attribute is only available for list items (I think).
2. You need an image control
3. You need a texture instead of the icon attribute
4. You should specify width & height of the image in your image control
5. Your $INFO is missing a ] at the end.
Try this
Adjust x,y,width & height and you're done.Code:<control type="image">
<posx>0</posx>
<posy>0</posy>
<width>80</width>
<height>80</height>
<aspectratio>keep</aspectratio>
<texture>$INFO[Weather.FanartCode,weathericons/,.png]</texture>
</control>