Custom weather icons?
#1
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!
Reply
#2
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
Reply
#3
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

Don't which xml file to put them in?
Reply
#4
Anywhere you want them to have.
Image
Reply
#5
Have placed the code in Home.xml, and located my folder for the custom weather icons, but it's still showing the defualt ones?

Once again, thanks for the help!
Reply
#6
And what happens if you remove your code?
Reply
#7
Hitcher Wrote:And what happens if you remove your code?

Nothing, it still uses the same icons. Eek
Reply
#8
Then you haven't replaced the right bit.
Reply
#9
Have been trying all day without any results, could you please help me? Smile
Reply
#10
maybe a silly thought of mine...but if you could pastebin the entire code
we may be able to point out the issue right away...

alternatively, we could also go on guessing for weeks ;-)


btw, checking your Debug Log may also provide some pointers,
mostly (not always) an error is being logged when xbmc fails to load some texture.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#11
My code looks like this:

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>
Reply
#12
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. Smile
Image
Reply
#13
`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. Smile

Thats what i thought. Laugh Is not easy when you're just started learning about 1 week ago. Thanks, that did the trick!
Reply
#14
`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. Smile
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.
Reply

Logout Mark Read Team Forum Stats Members Help
Custom weather icons?0