Solved Change Spesific Background Image directly
#1
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
Reply
#2
Remove the extension from your string value.
Reply
#3
Photo 
(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
Reply
#4
Not sure if it is typo but you have an extra comma before special://...
Reply
#5
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
Intel NUC 5YPPH-8Go-SSD120go-external drive 1To
Windows 10 PRO - Kodi Krypton 17 - IconMix
Reply
#6
(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..
Reply

Logout Mark Read Team Forum Stats Members Help
Change Spesific Background Image directly1