Skip to content

Full outline rather than shadow on FlxText #146

@FlixelCommunityBot

Description

@FlixelCommunityBot

Issue by msilver101 from 2012-10-27T22:57:55Z
Originally opened as AdamAtomic#234


I know how to implement this as well and would be happy to post code if you'd like. I find it quite helpful. It would be very easy to make a Boolean property for FlxText, something like fullOutlineShadow, that when set to true makes the whole text outlined rather than just the lower right.

I just add these lines to FlxText at line 287:

if(_shadow > 0)
{
    _textField.setTextFormat(new TextFormat(formatAdjusted.font,formatAdjusted.size,_shadow,null,null,null,null,null,formatAdjusted.align));                
    _matrix.translate(1, 1);
    _pixels.draw(_textField, _matrix, _colorTransform);
    _matrix.translate(0, -1);
    _pixels.draw(_textField, _matrix, _colorTransform);
    _matrix.translate(0, -1);
    _pixels.draw(_textField, _matrix, _colorTransform);
    _matrix.translate( -1, 0);
    _pixels.draw(_textField, _matrix, _colorTransform);
    _matrix.translate(-1, 0);
    _pixels.draw(_textField, _matrix, _colorTransform);
    _matrix.translate(0, 1);
    _pixels.draw(_textField, _matrix, _colorTransform);
    _matrix.translate(0, 1);
    _pixels.draw(_textField, _matrix, _colorTransform);
    _matrix.translate(1, 0);
    _pixels.draw(_textField, _matrix, _colorTransform);

    _matrix.translate(0,-1);
    _textField.setTextFormat(new TextFormat(formatAdjusted.font,formatAdjusted.size,formatAdjusted.color,null,null,null,null,null,formatAdjusted.align));
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions