Packagestarlingbuilder.engine
Interfacepublic interface IUIBuilder
Implementors UIBuilder

Main interface of the Starling Builder engine API

See also

UIBuilder


Public Properties
 PropertyDefined By
  localization : ILocalization
Localization property
IUIBuilder
  localizationHandler : ILocalizationHandler
Localization handler property
IUIBuilder
  tweenBuilder : ITweenBuilder
Tween builder property
IUIBuilder
Public Methods
 MethodDefined 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
Property Detail
localizationproperty
localization:ILocalization

Localization property


Implementation
    public function get localization():ILocalization
    public function set localization(value:ILocalization):void
localizationHandlerproperty 
localizationHandler:ILocalizationHandler

Localization handler property


Implementation
    public function get localizationHandler():ILocalizationHandler
    public function set localizationHandler(value:ILocalizationHandler):void
tweenBuilderproperty 
tweenBuilder:ITweenBuilder

Tween builder property


Implementation
    public function get tweenBuilder():ITweenBuilder
    public function set tweenBuilder(value:ITweenBuilder):void
Method Detail
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)

Returns
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

Returns
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 "_"

Returns
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)

Returns
Object — layout file data