Kodi Community Forum

Full Version: Adding Background To Button On Home.xml
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All

Please could someone help me with adding a background to the buttons that I have added to Home.xml

I have added <thumb> like below but it doesn't work.
Code:
<thumb>special://skin/backgrounds/Quit.jpg</thumb>


I would like it that when you focus on the Power button it should also show quit background.

Below is my full code for the Power and Settings buttons.

Code:
<control type="group" id="10">
    <control type="button" id="997">
        <description>Power button</description>
        <left>55</left>
        <bottom>30</bottom>
        <width>75</width>
        <height>75</height>
        <label>31003</label>
        <font>-</font>
        <onclick>Quit()</onclick>
        <texturefocus border="5">floor_buttonFO.png</texturefocus>
        <texturenofocus border="5">floor_button.png</texturenofocus>
        <onleft>100</onleft>
        <onright>998</onright>
        <onup>300</onup>
        <ondown>100</ondown>
        <thumb>special://skin/backgrounds/Quit.jpg</thumb>
    </control>
    <control type="image">
        <description>Power Icon</description>
        <left>60</left>
        <bottom>35</bottom>
        <width>65</width>
        <height>65</height>
        <aspectratio>keep</aspectratio>
        <texture>icon_power.png</texture>
    </control>
        <control type="label">
        <description>Quit Kodi</description>
        <left>150</left>
        <bottom>-40</bottom>
        <width>200</width>
        <height>200</height>
        <align>left</align>
        <font>font10</font>
        <label>Quit Kodi</label>
        </control>
    <control type="button" id="998">
        <description>Settings button</description>
        <right>75</right>
        <bottom>30</bottom>
        <width>75</width>
        <height>75</height>
        <label>31003</label>
        <font>-</font>
        <onclick>ActivateWindow(Settings)</onclick>
        <texturefocus border="5">floor_buttonFO.png</texturefocus>
        <texturenofocus border="5">floor_button.png</texturenofocus>
        <onleft>997</onleft>
        <onright>100</onright>
        <onup>300</onup>
        <ondown>100</ondown>
        <thumb>special://skin/backgrounds/Settings.jpg</thumb>
    </control>
    <control type="image">
        <description>Settings Icon</description>
        <right>80</right>
        <bottom>35</bottom>
        <width>65</width>
        <height>65</height>
        <aspectratio>keep</aspectratio>
        <texture>icon_system.png</texture>
    </control>
        <control type="label">
        <description>Settings</description>
        <right>70</right>
        <bottom>-40</bottom>
        <width>200</width>
        <height>200</height>
        <align>left</align>
        <font>font10</font>
        <label>Settings</label>
        </control>
    </control>

Hope to hear from anyone.

Many Thanks!

Sanjay
you have some basic mistakes.
1) buttons does not have <thumb/> tag - they have <texturefocus/> and <texturenofocus/> -> please read here: http://kodi.wiki/view/Button_control
2) if you like to change the background of the whole kodi skin (the 1920*1080 wallpaper), you need to change the image\multiimage control that your skin is using to change backgrounds

since I don't know which skin you're using, I can't help more than this.
(2016-05-05, 20:15)tomer953 Wrote: [ -> ]you have some basic mistakes.
1) buttons does not have <thumb/> tag - they have <texturefocus/> and <texturenofocus/> -> please read here: http://kodi.wiki/view/Button_control
2) if you like to change the background of the whole kodi skin (the 1920*1080 wallpaper), you need to change the image\multiimage control that your skin is using to change backgrounds

since I don't know which skin you're using, I can't help more than this.

Hi tomer953

Thank you for help.

I am using the Amber Skin in Jarvis.

I did have a look at the button_control wiki but I am new at skinning and trying to learn.

How do I use image\multimage control as that is not mentioned on button_control wiki.

This is my full Home.xml.

I have also tried the below as well but not working.

Code:
<texture background="special://skin/backgrounds/Settings.jpg">$INFO[Skin.CurrentTheme,special://skin/backgrounds/,.jpg]</texture>
from very quick look,
I can see here: https://github.com/pecinko/skin.amber/bl...me.xml#L15
that the background is taken from the "icon" of the current item in list "300" (the home main menu)

the items in the list is being includes here:
https://github.com/pecinko/skin.amber/bl...s.xml#L920

so if you'll add a new "item" with new </thumb> tag it will add the button you want with custom background.

beside of that tip, I suggest you to digging more into wiki manuals, and read all the relevant sticky thread here. if you find it too difficult, you can always contact the original skin author to ask him what you want.
I didn't ask in the amber skin forum because I copied the button code from default confluence skin Home.xml to amber skin Home.xml.

The buttons may not be something they would add into the amber skin, but I will try there to see if the author can help.

I don't know how skins work I just modify it to my liking, I have got the buttons working on the home page and just wanted to add full screen background when focused.

I thought if I posted here someone would be able to correct my mistakes and help me with the code to add the background.

I have been going through skinning manuals but it will take me a long time to learn how skinnings work and create what I want.