2011-08-02, 01:30
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.
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.