Kodi Community Forum

Full Version: Change Spesific Background Image directly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Everyone, I need yourhelp..
I'm trying become skinner Smile. I want to change Background Image using button.
So when the button is pressed, the Background Image will switch directly with my picture..
This is my code,,
Code:
<control type="button">
        <description>change background</description>
                       <posx>130</posx>
                <posy>250</posy>
                <width>120</width>
                <height>110</height>
                <align>center</align>
                <aligny>center</aligny>
                <texturefocus>circle_theme1.png</texturefocus>
                <texturenofocus>circle_theme2.png</texturenofocus>
                <onclick>Skin.SetImage(SKINDEFAULT2.jpg,special://skin/backgrounds/,.jpg)</onclick>
                <enable>Skin.HasSetting(UseCustomBackground)</enable>
            </control>

I'm using SetImage,but it'snot directly switch Sad

Thanks.
Best regards,
Enic
Remove the extension from your string value.
(2016-09-23, 10:12)Hitcher Wrote: [ -> ]Remove the extension from your string value.
Hello hitcher,, I have removed the extension from string value..
but it still doesnt work..
Code:
<control type="button">
               <description>change background</description>
                <posx>130</posx>
                <posy>250</posy>
                <width>120</width>
                <height>110</height>
                <align>center</align>
                <aligny>center</aligny>
                <texturefocus>circle_theme1.png</texturefocus>
                <texturenofocus>circle_theme2.png</texturenofocus>
                <onclick>Skin.SetImage(SKINDEFAULT2,,special://skin/backgrounds/,.jpg)</onclick>
                <enable>Skin.HasSetting(UseCustomBackground)</enable>
            </control>

Image

Image

Searching for imagepath..? Any solutions?
I really appreciate your solutions / comments..

Thanks
best regards,
enic
Not sure if it is typo but you have an extra comma before special://...
The first parameter is a string variable not a value… .
When you select a picture or path, his path is write in this first parameter of setimage..
So, the first parameter must be a skin setting name used by your background display function….

1- select image with Skin.SetImage(custombackground,special://skin/backgrounds/,.jpg)
2- display your background with <texture>$INFO[Skin.String(custombackground)] </texture> or imagepath for image slideshow of course
(2016-09-29, 07:49)telexxingou Wrote: [ -> ]The first parameter is a string variable not a value… .
When you select a picture or path, his path is write in this first parameter of setimage..
So, the first parameter must be a skin setting name used by your background display function….

1- select image with Skin.SetImage(custombackground,special://skin/backgrounds/,.jpg)
2- display your background with <texture>$INFO[Skin.String(custombackground)] </texture> or imagepath for image slideshow of course

Thanks for your helps, I have solved the problems..