StarlingGraphics / Starling-Extension-Graphics

flash.display.Graphics style extension for the Starling Flash GPU rendering framework
https://github.com/StarlingGraphics/Starling-Extension-Graphics/wiki
MIT License
285 stars 88 forks source link

textfield not show when add shape on displaylist #49

Closed peerobo closed 10 years ago

peerobo commented 11 years ago

code from GraphicsAPIExample.as and i add a textfield at the bottom:

        var rockTexture:Texture = Texture.fromBitmap( new RockBMP(), false );
        var grassTexture:Texture = Texture.fromBitmap( new GrassBMP(), false );

        shape.graphics.beginTextureFill(rockTexture, m);
        shape.graphics.lineTexture(20, grassTexture);
        shape.graphics.drawRect(top, left, right, bottom);
        shape.graphics.endFill();

        var txt:TextField = new TextField(50, 50, "hello");
        addChild(txt);
IonSwitz commented 10 years ago

This was a long time ago, but I did the same thing now, and it worked fine. The default color of the TextField is 0, ie black, so it didnt show up for me either but when I added txt.color = 0xFFFFFF; it worked fine.

Closing