module els{ export class TextFieldRenderer extends Renderer{ private _textField: egret.TextField; text: string; type: string; italic: boolean; border: boolean; borderColor: number; background: boolean; backgroundColor: number; maxChars: number; displayAsPassword: boolean; multiline: boolean; textAlign: string; size: number; fontFamily: string; bold: boolean; inputType: string; constructor() { super(); this._textField = new egret.TextField(); this._renderer.addChild(this._textField); } onAwake() { this._textField.text = this.text; this._textField.type = this.type; this._textField.italic = this.italic; this._textField.border = this.border; this._textField.borderColor = this.borderColor; this._textField.background = this.background; this._textField.backgroundColor = this.backgroundColor; this._textField.maxChars = this.maxChars; this._textField.displayAsPassword = this.displayAsPassword; this._textField.multiline = this.multiline; this._textField.textAlign = this.textAlign; this._textField.size = this.size; this._textField.fontFamily = this.fontFamily; this._textField.bold = this.bold; this._textField.inputType = this.inputType; } clone(): TextFieldRenderer { let component: TextFieldRenderer = new TextFieldRenderer(); component.enabled = this.enabled; component.text = this.text; component.type = this.type; component.italic = this.italic; component.border = this.border; component.borderColor = this.borderColor; component.background = this.background; component.backgroundColor = this.backgroundColor; component.maxChars = this.maxChars; component.displayAsPassword = this.displayAsPassword; component.multiline = this.multiline; component.textAlign = this.textAlign; component.size = this.size; component.fontFamily = this.fontFamily; component.bold = this.bold; component.inputType = this.inputType; return component; } } }