|
The tag <item type="button"> displays a textured button at the screen.
It takes the following parameters, one per line:
- <texture ... />
Specifies the texture files to use. Takes three arguments normal=""
over="" pressed=" which represent the textures used whe the button sits
there, the mouse is hovering over it and the button is clicked
resprectively.
Examples:
<texture normal="/data/KKJ_normal.rgb" over="/data/KKJ_over.rgb" pressed="/data/KKJ_pressed.rgb" />
Will use the file /data/KKJ_normal.rgb for normal display,
/data/KKJ_over.rgb when the mouse hovers over the button and
/data/KKJ_pressed.rgb when the button is clicked.
- <position ... />
Specifies the center of the button. Takes two arguments x="" and y=""
specifying the X and Y coordinates respectively as a floating point
value.
Examples:
<position x="0.0" y="0.0" />
Places the button at the center of the screen
<position x="-40.0" y="-40.0" />
Places the button in the top left part of the screen.
<position x="40.0" y="40.0" />
Places the button in the lower right part of the screen.
- <size ... />
Specifies the size of the button. Takes two arguments w="" and h=""
specifying the width and height respectively as a floating point value.
Examples:
<size w="40.0" h="20.0" />
Makes the button twice as wide as it its height.
<size w="10.0" h="50" />
Makes the button a thin, vertical line.
- <action>...</action>
Specifies the action that is to be taken when the button is pressed.
Examples:
<action>/usr/bin/mplayer -fs -zoom '/data/video/trailer/Return of the King.avi'</action>
Uses /usr/bin/mplayer to play the file '/data/video/trailer/Return of
the King.avi' in fullscreen mode with software zooming if necessary
(note that -fs and -zoom are parameters to mplayer and NOT LVP)
|