Kodi Community Forum
Dynamic autoscrollspeed - closed - 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: Dynamic autoscrollspeed - closed (/showthread.php?tid=331279)



Dynamic autoscrollspeed - closed - MichCan - 2018-04-24

Hello !
I create a skin on xbmc. I want he user can change the autoscroll speed of the home window.
So i added a Skin.SetNumeric() to customsettings.xml it seems to work (the value appear on the setting.xml file) and i can read this value on <info> tag using Skin.String(myvalue).
I tried also on include.xml : <constant name="myvalue">Skin.String(myvalue)</constant>
but :
<autoscroll time=$INFO[Skin.String(myvalue)]>true</autoscroll>
or
<autoscroll time=myvalue]>true</autoscroll>
doesn't work.
Did you know where the problem is ?
Thank you !

------ EDIT -- it works ---

Here is the code
https://pastebin.com/9UUjH6dh


RE: Dynamic autoscrollspeed - badaas - 2018-04-24

<autoscroll time="200">Skin.String(myvalue,200)</autoscroll>

..maybe ?


RE: Dynamic autoscrollspeed - jurialmunkey - 2018-04-25

Skin strings cannot be used as integer values for coordinates etc. Also, constants cannot take variable/changeable values.

I'm not sure if @badaas method works or not. If it doesn't, then the only way is to have multiple conditional includes for each of the possible values.


RE: Dynamic autoscrollspeed - MichCan - 2018-04-25

Thanks for your answer.
<autoscrol></autoscroll> only accept true or false...
I tried to use :
<autoscrol time="500">mycondition</autoscroll>
<autoscrol time="1000">mycondition2</autoscroll>...
It doesn't work.

So, I used multiple conditional includes and it works.
I already seen this solution in other thread, i thinked there was smarter one. But no...
I will share the code soon.