Conditional position of skin control
#1
Is it possible to set a conditional position, height / width of a control based on a skin setting?
I'd like to reposition a bunch of controls based on a skin setting and would rather not duplicate each control with it's adjusted settings, then set a visible condition.

Ideally I'm looking to do something like this;

<Control type="image">
<posx condition=Skin.HasSetting(setting)>300</posx>
<posx condition=!Skin.HasSetting(setting)>600</posx>
...
</Control>

Can something like that be achieved ?
Reply
#2
look at the wiki for animations eg: slide, zoom etc.
Noli illegitimi carborundum


Reply
#3
Thanks, unless I'm missing something I can't see how I'd manage to change control height / width via animations.
It probably wasn't really clear in my example but I need to move the controls and make them wider based on the skin setting.
Reply
#4
maybe you could use the new <height>auto</height> and <width>auto</width> feature of Gotham. it may be worth a try.
HTPC LibreELEC 9.0 - Xperience1080+
RPi3 LibreELEC Milhouse build - Arctic Zephyr
Reply
#5
In Includes.xml
Code:
<include name="MyWidth1">
    <width>1200</width>
</include>
<include name="MyWidth2">
    <width>1000</width>
</include>
In your Control replace the <width> with:
Code:
<include condition="!Skin.HasSetting(MySetting)">MyWidth1</include>
<include condition="Skin.HasSetting(MySetting)">MyWidth2</include>
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#6
(2014-02-09, 19:00)MassIV Wrote: In Includes.xml
Code:
<include name="MyWidth1">
    <width>1200</width>
</include>
<include name="MyWidth2">
    <width>1000</width>
</include>
In your Control replace the <width> with:
Code:
<include condition="!Skin.HasSetting(MySetting)">MyWidth1</include>
<include condition="Skin.HasSetting(MySetting)">MyWidth2</include>

Remember, if you change the setting while still viewing the window referenced by the setting - for example, toggling info in for a list view - you'll have to refresh the skin since conditions are only checked on opening the window.
Reply

Logout Mark Read Team Forum Stats Members Help
Conditional position of skin control0