GUIButton.Alpha

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events


This function sets/returns the alpha value of a button. Note that if this button has a parent element, its Alpha member will override this setting.

Syntax

  1. int GUIButton.Alpha
  1. GUIButton.Alpha = int alpha

Arguments

  • alpha - An integer value for alpha (0...255)

Example 1. Returning

This code will message the player with a button's alpha when one is clicked on.

  1.  
  2. function onClientClickButton( button )
  3. {
  4. Message( "Button alpha: " + button.Alpha, player );
  5. }
  6.  

Notes

The event onClientClickButton and function Message were used in this example and more information can be found on their corresponding pages.

Example 2. Setting

This code will make a "ghost" button when one is clicked on.

  1.  
  2. function onClientClickButton( button )
  3. {
  4. button.Alpha = 90;
  5. }
  6.  

Notes

-- List of used functions and other notes here.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox