Package | starlingbuilder.engine |
Interface | public interface IUIBuilder |
Implementors | UIBuilder |
See also
Property | Defined By | ||
---|---|---|---|
localization : ILocalization
Localization property
| IUIBuilder | ||
localizationHandler : ILocalizationHandler
Localization handler property
| IUIBuilder | ||
tweenBuilder : ITweenBuilder
Tween builder property
| IUIBuilder |
Method | Defined By | ||
---|---|---|---|
create(data:Object, trimLeadingSpace:Boolean = true, binder:Object = null):Object
Create display objects from layout. | IUIBuilder | ||
createUIElement(data:Object):Object
Create UI element from data
| IUIBuilder | ||
load(data:Object, trimLeadingSpace:Boolean = true, binder:Object = null):Object
Load from layout data, create display objects and the associated meta data
| IUIBuilder | ||
localizeTexts(root:DisplayObject, paramsDict:Dictionary):void
Localize texts in display object
| IUIBuilder | ||
save(container:DisplayObjectContainer, paramsDict:Object, version:String, setting:Object = null):Object
Save display object container to layout data
| IUIBuilder |
localization | property |
localization:ILocalization
Localization property
public function get localization():ILocalization
public function set localization(value:ILocalization):void
localizationHandler | property |
localizationHandler:ILocalizationHandler
Localization handler property
public function get localizationHandler():ILocalizationHandler
public function set localizationHandler(value:ILocalizationHandler):void
tweenBuilder | property |
tweenBuilder:ITweenBuilder
Tween builder property
public function get tweenBuilder():ITweenBuilder
public function set tweenBuilder(value:ITweenBuilder):void
create | () | method |
public function create(data:Object, trimLeadingSpace:Boolean = true, binder:Object = null):Object
Create display objects from layout. Short cut for load().object
Parameters
data:Object | |
trimLeadingSpace:Boolean (default = true )
| |
binder:Object (default = null )
|
Object |
See also
createUIElement | () | method |
public function createUIElement(data:Object):Object
Create UI element from data
Parameters
data:Object — data in as3 plain object format
|
Object — starling display object
|
load | () | method |
public function load(data:Object, trimLeadingSpace:Boolean = true, binder:Object = null):Object
Load from layout data, create display objects and the associated meta data
Parameters
data:Object — layout data
| |
trimLeadingSpace:Boolean (default = true ) — whether to trim the leading space on the top level elements
set to true if loading a popup, set to false if loading a hud
| |
binder:Object (default = null ) — An optional object you want to bind properties with UI components with the same name, if name starts with "_"
|
Object — An object with {object:Sprite, params:Dictionary, data:data};
object: the sprite to create params: A Dictionary of the mapping of every UIElement to its layout data data: the as3 plain object format of the layout |
See also
localizeTexts | () | method |
public function localizeTexts(root:DisplayObject, paramsDict:Dictionary):void
Localize texts in display object
Parameters
root:DisplayObject — of the DisplayObject needs to be localize
| |
paramsDict:Dictionary — Dictionary of the mapping of every UIElement to its layout data
|
save | () | method |
public function save(container:DisplayObjectContainer, paramsDict:Object, version:String, setting:Object = null):Object
Save display object container to layout data
Parameters
container:DisplayObjectContainer — Display object container needed to export to layout
| |
paramsDict:Object — A Dictionary of the mapping of every UIElement to its layout data
| |
version:String — project setting like canvas size, background info used by the editor
| |
setting:Object (default = null )
|
Object — layout file data
|