Kodi Community Forum
text in includes - 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: text in includes (/showthread.php?tid=69529)



text in includes - r1ctus - 2010-02-04

i have a long text i'd like to use at many places in the skin as a condition. i'd like to include it in includes.xml, like i include a constant. is this possible?


- eumel - 2010-02-04

r1ctus Wrote:i have a long text i'd like to use at many places in the skin as a condition. i'd like to include it in includes.xml, like i include a constant. is this possible?
I believe <constants> can only be numeric.
But you can do:
Code:
<include name="mylabel">
   <label>text</label>
</include>

<control type="label">
    <include>mylabel</include>
    <posx></posx>
    <posy></posy>
</control>

or include the complete <control>


- r1ctus - 2010-02-04

sorry, i dont think i asked the question clearly. the text i'd like to include is a long condition, part of it is this:
Code:
[Skin.String(CurrentViewMode,50) + Skin.HasSetting(ShowMusicIconTopBar) + Window.IsActive(MusicLibrary)]
i'd like to use this text as a condition in the skin somehow like this:
Code:
<animation effect="slide" end="0,-43" condition="**The Condition I Included***">Conditional</animation>
i hope my question is easier to understand this way.


- phil65 - 2010-02-04

r1ctus Wrote:sorry, i dont think i asked the question clearly. the text i'd like to include is a long condition, part of it is this:
Code:
[Skin.String(CurrentViewMode,50) + Skin.HasSetting(ShowMusicIconTopBar) + Window.IsActive(MusicLibrary)]
i'd like to use this text as a condition in the skin somehow like this:
Code:
<animation effect="slide" end="0,-43" condition="**The Condition I Included***">Conditional</animation>
i hope my question is easier to understand this way.

you can create a control (button control for example), set its visibilty condition (the one you want to use) and give it an id (65 for example). then you can use condition="control.isvisible(65)"