Package | verlocity.display.ui |
Class | public class UIElement |
Inheritance | UIElement flash.display.Sprite |
Subclasses | Achievement, AchievementList, AchievementProgress, Bar, Indicator, PauseMenu, Scroll, Text |
Property | Defined By | ||
---|---|---|---|
nScale : Number | UIElement |
Method | Defined 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 |
nScale | property |
protected var nScale:Number
originX | property |
public var originX:Number
originY | property |
public var originY:Number
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.
ReturnsNumber —
|
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).
|