public AsStatsDisplay()
 {
     mBackground = new AsQuad(50, 25, 0x0);
     mTextField = new AsTextField(48, 25, "", AsBitmapFont.MINI, AsBitmapFont.NATIVE_SIZE, 0xffffff);
     mTextField.setX(2);
     mTextField.setHAlign(AsHAlign.LEFT);
     mTextField.setVAlign(AsVAlign.TOP);
     addChild(mBackground);
     addChild(mTextField);
     addEventListener(AsEvent.ENTER_FRAME, onEnterFrame);
     updateText(0, getMemory(), 0);
     setBlendMode(AsBlendMode.NONE);
 }
예제 #2
0
 private void createTextField()
 {
     if(mTextField == null)
     {
         mTextField = new AsTextField(mTextBounds.width, mTextBounds.height, "");
         mTextField.setVAlign(AsVAlign.CENTER);
         mTextField.setHAlign(AsHAlign.CENTER);
         mTextField.setTouchable(false);
         mTextField.setAutoScale(true);
         mContents.addChild(mTextField);
     }
     mTextField.setWidth(mTextBounds.width);
     mTextField.setHeight(mTextBounds.height);
     mTextField.setX(mTextBounds.x);
     mTextField.setY(mTextBounds.y);
 }