Difference between revisions of "LavishGUI:button (Element Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
 
=== What is a Button? ===
 
=== What is a Button? ===
A button is a box that performs an action when clicked.
+
A button is a box that performs an action when clicked. Buttons use [[LavishGUI:lguibutton_%28Data_Type%29|lguibutton (Data Type)]] for access via LavishScript.
 
== Using Buttons ==
 
== Using Buttons ==
 
Buttons are descendants of the [[LavishGUI:Elements|base]] element type.  Any attributes of the [[LavishGUI:Elements|base]] element type may be applied in addition to the button-specific properties described below.
 
Buttons are descendants of the [[LavishGUI:Elements|base]] element type.  Any attributes of the [[LavishGUI:Elements|base]] element type may be applied in addition to the button-specific properties described below.

Latest revision as of 22:25, 15 December 2005

Introduction

What is a Button?

A button is a box that performs an action when clicked. Buttons use lguibutton (Data Type) for access via LavishScript.

Using Buttons

Buttons are descendants of the base element type. Any attributes of the base element type may be applied in addition to the button-specific properties described below.

Button-Specific Properties

  • BackgroundColor
Background color
  • Border
Size of border around the element. This border is included in the size of the element
  • BorderColor
Border color
  • Font
Font reference (Name, Size, Color)
  • Text
Text to be displayed on the button
  • Texture
Texture displayed when the button is in its normal, unpressed state. If a texture is used, BackgroundColor is ignored.
  • TexturePressed
Texture displayed while the button is being pressed
  • TextureHover
Texture displayed while the mouse is over the unpressed button

Examples

Example XML code

	<button name='TestButton'>
		<Width>130</Width> 
		<Height>30</Height> 
		<BackgroundColor></BackgroundColor>
		<Font>
                   <Name>terminal</Name>
                   <Size>12</Size>
                   <Color>FFFF00FF</Color>
                </Font>
                <Texture Filename='Button.png'>
                   	<Border>5</Border>
                	<Right>64</Right>
                	<Bottom>64</Bottom>
                </Texture>
	        <TexturePressed Template='ButtonTexturePressedTemplate'></TexturePressed>
		<TextColor>FFEECC00</TextColor>
	</button>

See Also