Packageverlocity.display.ui
Classpublic class UIElement
InheritanceUIElement Inheritance flash.display.Sprite
Subclasses Achievement, AchievementList, AchievementProgress, Bar, Indicator, PauseMenu, Scroll, Text



Public Properties
 PropertyDefined By
  originX : Number
UIElement
  originY : Number
UIElement
Protected Properties
 PropertyDefined By
  nScale : Number
UIElement
Public Methods
 MethodDefined By
  
Clear():void
Clears all graphics drawn on the UI element.
UIElement
  
Dispose():void
Destroys the UI element.
UIElement
  
DrawRect(uiColor:uint = 0xFFFFFF, nAlpha:Number = 1, iWidth:int = 0, iHeight:int = 0, bLine:Boolean = false, iLineThickness:int = 1, uiLineColor:uint = 0xFFFFFF, nLineAlpha:Number = 1, bRounded:Boolean = false, iRoundness:int = 10, iOffsetX:int = 0, iOffsetY:int = 1):void
Draws a rectangle onto the UI element.
UIElement
  
GetScale():Number
Returns the scale of the UI element.
UIElement
  
ResetPos():void
Resets the X and Y position of the UI element to its original spawn position.
UIElement
  
SetOriginPos(nPosX:Number, nPosY:Number):void
Overrides origin position
UIElement
  
SetPos(nPosX:Number, nPosY:Number):void
Sets the X and Y position of the UI element.
UIElement
  
SetScale(nSetScale:Number):void
Sets the scale of the UI element.
UIElement
Property Detail
nScaleproperty
protected var nScale:Number

originXproperty 
public var originX:Number

originYproperty 
public var originY:Number

Method Detail
Clear()method
public function Clear():void

Clears all graphics drawn on the UI element.

Dispose()method 
public function Dispose():void

Destroys the UI element.

DrawRect()method 
public function DrawRect(uiColor:uint = 0xFFFFFF, nAlpha:Number = 1, iWidth:int = 0, iHeight:int = 0, bLine:Boolean = false, iLineThickness:int = 1, uiLineColor:uint = 0xFFFFFF, nLineAlpha:Number = 1, bRounded:Boolean = false, iRoundness:int = 10, iOffsetX:int = 0, iOffsetY:int = 1):void

Draws a rectangle onto the UI element. This is the easiest way to create custom buttons.

Parameters

uiColor:uint (default = 0xFFFFFF) — The color of the rect
 
nAlpha:Number (default = 1) — The alpha of the rect
 
iWidth:int (default = 0) — The width of the rect
 
iHeight:int (default = 0) — The height of the rect
 
bLine:Boolean (default = false) — Should there be a line surrounding it?
 
iLineThickness:int (default = 1) — How thick the line is
 
uiLineColor:uint (default = 0xFFFFFF) — The color of the line
 
nLineAlpha:Number (default = 1) — The alpha of the line
 
bRounded:Boolean (default = false) — Is the rect rounded?
 
iRoundness:int (default = 10) — How much should the rect be rounded by?
 
iOffsetX:int (default = 0) — The X offset of the rect
 
iOffsetY:int (default = 1) — The Y offset of the rect

GetScale()method 
public function GetScale():Number

Returns the scale of the UI element.

Returns
Number
ResetPos()method 
public function ResetPos():void

Resets the X and Y position of the UI element to its original spawn position.

SetOriginPos()method 
public function SetOriginPos(nPosX:Number, nPosY:Number):void

Overrides origin position

Parameters

nPosX:Number
 
nPosY:Number

SetPos()method 
public function SetPos(nPosX:Number, nPosY:Number):void

Sets the X and Y position of the UI element.

Parameters

nPosX:Number — The X position to set the UI element to.
 
nPosY:Number — The Y position to set the UI element to.

SetScale()method 
public function SetScale(nSetScale:Number):void

Sets the scale of the UI element.

Parameters

nSetScale:Number — The scale to scale the UI element to (this effects both X and Y scales).