Sort of user definable types
#1
Is anybody interested in a pseudo type definition within defaults.xml, such that you could define a number of different buttons (or other controls).

For example within defaults.xml you define controls thus

<default type="hiddenbutton" basetype="button">
<posx>-20</posx>
<posy>-20</posy>
<width>1</width>
<height>1</height>
<label>-</label>
<texturenofocus>-</texturenofocus>
<texturefocus>-</texturefocus>
</default>


This would then allow you to define a type "hiddenbutton" anywhere else in the skin i.e

<control type="hiddenbutton">
<onfocus>Dosomething</onfocus>
</control>

You could then define another button like a "menubutton" with a completely different set of parameters and then do something like.

<control type="menubutton">
<label>Stuff</label>
</control>


All of this can be done with includes, but I find this quite useful for having a number of templates and changing one parameter.

If this is of interest, or stupid, please let me know. I can then put forward a pull request or not.
Reply
#2
I like the idea. An alternative might be to provide includes with parameters (though this is perhaps attacking a more general problem.)

I guess potentially, basetype would allow multiple "inheritance"?

As you say, it can already be done with includes, albeit with an extra line of code.

<control type="button">
<include>menubutton</include>
<label>foo</label>
</control>

I'd be most interested in hearing what skinners think.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Sort of user definable types0