Kodi Community Forum
<Include> Question - 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: <Include> Question (/showthread.php?tid=198321)



<Include> Question - bkury - 2014-06-21

hello,

I'm experimenting with some skinning ideas I had recently and now I'm stuck with an overhead problem :

Let's say I have 1..1000 lines of something like this :
Code:
<include condition="Skin.String(PosX,1)">PosX_1</include>
...
<include condition="Skin.String(PosX,1000)">PosX_1000</include>

This is clearly not the way to go because of the huge overhead but is there a way to make it more efficient ? Tried the following :

Code:
<include>PosX_$INFO[Skin.String(PosX)]</include>
<include>PosX_$VAR[xxx]</include>
would be the way to go but it seems that <include> doesn't parse info tags Undecided <constant> also doesn't work with info tags, and $VAR[xxx] can't be used with <posx>
so is there any way to make this happen without 1000 lines of code?

thanks for your help!


RE: <Include> Question - jmarshall - 2014-06-21

I suggest starting with what you want to achieve. It may be that you're going completely the wrong way about it.


RE: <Include> Question - bkury - 2014-06-21

(2014-06-21, 00:41)jmarshall Wrote: I suggest starting with what you want to achieve. It may be that you're going completely the wrong way about it.
thanks for your reply ...

I want to change the <posx> from an image/label/control based on user input [Skin.SetString(Posx)] where posx can be 1 to 1280 ... so, basically what I need is a dynamic/infolabel <posx> or <include>, something like this:

Code:
<posx>$INFO[Skin.String(posx)]</posx>
<posx>$VAR[posx]</posx>

or with include:

<include>PosX_$INFO[Skin.String(posx)]</include>
<include>PosX_$VAR[posx]</include>
hope you guys know what I mean. thanks!


RE: <Include> Question - `Black - 2014-06-21

You will need 1000 lines of code.


RE: <Include> Question - Hitcher - 2014-06-21

Surely it doesn't need to be in 1 pixel increments?


RE: <Include> Question - bkury - 2014-06-21

(2014-06-21, 10:49)`Black Wrote: You will need 1000 lines of code.
I thought so, thanks Undecided

(2014-06-21, 16:10)Hitcher Wrote: Surely it doesn't need to be in 1 pixel increments?
No, but even with 10 increments/steps it's getting to slow to load with 3+ controls because of the hundreds of <include condition="StringCompare's">.


I don't know if it's possible to implement something like that with the current xbmc render/xml engine but it would open the door for some really cool possibilities. So, anyway is it possible to implement or allow either :
  • Allow/Parse Infolabels for <posx>, <posy>, <width>, <height>, <left>, <top> OR
  • Allow $VAR[] for <posx>, <posy>, ..... OR
  • Allow/Parse Infolabels for <constants>
All of this 3 implementations/suggestions would solve the problem and the need to have 1000+ lines of code if you want to have some kind of "dynamic" positioning.

thanks!


RE: <Include> Question - bkury - 2014-06-26

Sorry for bumping this thread, but I just want to know if such a feature is possible or even considered being implemented by a xbmc dev. For those who are wondering why this would be a great thing to have: I've been working on a "Custom Viewmode" Feature which basically allows everybody to create their own viewmode and share it with others ...

Demo Video [BETA]:


I think this would open the door for some really fresh and extraordinary viewmodes created by users for users ...

Thanks!


RE: <Include> Question - Kib - 2014-06-27

Enough about the custom stuff. I *love* your animations.