public InputTextField()
{
gameObject.name = "InputTextField";
onFocusIn = new EventListener(this, "onFocusIn");
onFocusOut = new EventListener(this, "onFocusOut");
onChanged = new EventListener(this, "onChanged");
onSubmit = new EventListener(this, "onSubmit");
_text = string.Empty;
maxLength = 0;
editable = true;
_composing = 0;
keyboardInput = Stage.keyboardInput;
/* 因为InputTextField定义了ClipRect,而ClipRect是四周缩进了2个像素的(GUTTER),默认的点击测试
* 是使用ClipRect的,那会造成无法点击四周的空白区域。所以这里自定义了一个HitArea
*/
this.hitArea = new RectHitTest();
this.touchChildren = false;
onFocusIn.Add(__focusIn);
onFocusOut.AddCapture(__focusOut);
onKeyDown.AddCapture(__keydown);
onTouchBegin.AddCapture(__touchBegin);
onTouchMove.AddCapture(__touchMove);
}