Kodi Community Forum
need help with textcolor - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: need help with textcolor (/showthread.php?tid=273307)



need help with textcolor - Mikewave - 2016-05-10

how can i get this to work as it doesn't seem too.

Code:
<textcolor Condition="Container(9000).HasFocus(998)">white</textcolor>

trying to change the text color when focus on a content


RE: need help with textcolor - ronie - 2016-05-10

the textcolor tag doesn't have a condition attribute.
try using a $VAR[] instead.


RE: need help with textcolor - tomer953 - 2016-05-10

textcolor tags does not accept "condition" attribute.

you can use two different controls with:
Code:
<textcolor>white</textcolor>
<visible>Container(9000).HasFocus(998)</visible>

and:
Code:
<textcolor>red</textcolor>
<visible>!Container(9000).HasFocus(998)</visible>

or, you can use variables:
Code:
<textcolor>$VAR[foo]</textcolor>

Code:
<variable name="foo">
<value condition="Container(9000).HasFocus(998)">white</value>
<value>red</value>
</variable>

edit:
and ronie is quicker once again :]


RE: need help with textcolor - Mikewave - 2016-05-10

thanks i'll give that a go


RE: need help with textcolor - Torben - 2016-05-10

What is the control type? There could be better ways.


RE: need help with textcolor - Rjsachse - 2016-05-11

You could also use includes with conditions. It might not be best solution just letting you know all of your options
E.G
PHP Code:
<include name="whitetext">
<
textcolor>white<\textcolor>
</include> 
And: put this in the control
PHP Code:
<include condition="foo">whitetext</include>