2015-07-14, 11:51
http://forum.kodi.tv/showthread.php?tid=116132
something like this (or simpler) is available?
something like this (or simpler) is available?
<item id="1">
<onclick condition="!IsEmpty(Window(home).Property(highlightselect))">Skin.SetString(highlightcolor.name,FF93ce5f)</onclick>
<onclick condition="!IsEmpty(Window(home).Property(backgroundselect))">Skin.SetString(backgroundcolor.name,FF93ce5f)</onclick>
<onclick condition="!IsEmpty(Window(home).Property(dialogselect))">Skin.SetString(dialogcolor.name,FF93ce5f)</onclick>
<onclick condition="!IsEmpty(Window(home).Property(textselect))">Skin.SetString(textcolor.name,FF93ce5f)</onclick>
<onclick>Close</onclick>
<thumb>colors/FF93ce5f.png</thumb>
<label>FF93ce5f</label>
</item>
<item id="1">
<onclick>Skin.SetString($INFO[Skin.String(color_picker)],FF93ce5f)</onclick>
<thumb>colors/FF93ce5f.png</thumb>
<label>FF93ce5f</label>
</item>
<onclick>Skin.SetString(color_picker,main_color)</onclick>
<onclick>ActivateWindow(1130)</onclick>
(2015-07-15, 23:15)tomer953 Wrote: OK Braz, I used your code if its ok.... my result:Thanks, I've been thinking about taking another look at this code. I'd like to get rid of the color images and instead use colordiffuse with the color string. Not sure if that will work with the thumb tags in a panel though.
I need to arrange the icons, but the idea is lines of "10" with the same color family.
I wanted to give you some advise If you want,
In your code you make every item like:
Code:<item id="1">
<onclick condition="!IsEmpty(Window(home).Property(highlightselect))">Skin.SetString(highlightcolor.name,FF93ce5f)</onclick>
<onclick condition="!IsEmpty(Window(home).Property(backgroundselect))">Skin.SetString(backgroundcolor.name,FF93ce5f)</onclick>
<onclick condition="!IsEmpty(Window(home).Property(dialogselect))">Skin.SetString(dialogcolor.name,FF93ce5f)</onclick>
<onclick condition="!IsEmpty(Window(home).Property(textselect))">Skin.SetString(textcolor.name,FF93ce5f)</onclick>
<onclick>Close</onclick>
<thumb>colors/FF93ce5f.png</thumb>
<label>FF93ce5f</label>
</item>
Because you use it to define 4 different colors, but you could make it more global color picker, by using String, like this:
and in your skinsetting.xml use this:Code:<item id="1">
<onclick>Skin.SetString($INFO[Skin.String(color_picker)],FF93ce5f)</onclick>
<thumb>colors/FF93ce5f.png</thumb>
<label>FF93ce5f</label>
</item>
Code:<onclick>Skin.SetString(color_picker,main_color)</onclick>
<onclick>ActivateWindow(1130)</onclick>
Also removed the "Close" action from onclick, it is better to see "live changes" and then hit "OK" when finish
<visible>StringCompare(ListItem.Label,Skin.String(Skin.String(color_picker)))</visible>
<onload>SetProperty(colorpicker,$VAR[color_picker])</onload>
<texture>star.png</texture>
<visible>StringCompare(ListItem.Label,Window().Property(colorpicker))</visible>
<!--black -->
<onclick>Skin.SetString($INFO[Skin.String(color_picker)],FF000000)</onclick>
<onclick>SetProperty(colorpicker,FF000000)</onclick>
<variable name="color_picker">
<value condition="StringCompare(Skin.String(color_picker),BG.Color1)">$INFO[Skin.String(BG.Color1)]</value>
<value condition="StringCompare(Skin.String(color_picker),BG.Color2)">$INFO[Skin.String(BG.Color2)]</value>
....