Open JoeCreates opened 10 years ago
How do you plan to implement this? Filters? Will it work cross-platform?
@larsiusprime The implementation would likely be a modified version of the existing implementation (i.e. draws stuff onto the FlxText's cachedGraphics bitmapData). It has to be cross-platform. If there is a more efficient cross-platform way of doing certain effects with filters, then that could be changed in the implementation of that specific FlxTextEffect
, but for now I wasn't planning on looking into that much. Abstracting it like this would make it easy enough to change the implementation of specific effects later without causing anything to break.
This would be great, but i assume making it work seamlessly across all platforms would be hard to do also.
Tiago Ling Alexandre Tel: +55 41 8819-3191
2014-06-10 19:47 GMT-03:00 Joe Williamson notifications@github.com:
Turns out this is a lot harder than I anticipated, largely due to the fact that formats can be applied to subsections of the text.
— Reply to this email directly or view it on GitHub https://github.com/HaxeFlixel/flixel/issues/1165#issuecomment-45681972.
Seeing this issue now. What if this new class FlxEffectText
extends the newly released FlxEffectSprite
and use the IFlxEffect
s? The missing effects could added and would work for every FlxEffectSprite
as well, and I'm sure you guys could also help to improve existing effects.
Using a separate FlxText
class for this doesn't sound good.
Right, not a new class so. Passing current FlxText
as target to FlxEffectSprite
would work?
Presently, it is very difficult to make a
FlxText
look distinct. I wish to improveFlxText
to make it possible to have multiple outlines, multiple shadows, gradients, and perhaps other effects. What I would like would be a breaking change, so before I go ahead and try it, I'd like some feedback.I would like to change the following:-
borderStyle
and its related properties. (Since when did a shadow count as a border?)FlxTextEffect
to represent the various filters.FlxTextOutline
,FlxTextGradient
, andFlxTextShadow
.FlxTextEffect
s toFlxText
.addOutline()
,addShadow()
, andaddGradient()
?Note that effects would be applied cumulatively. This would make text significantly more customizable. Instead of just having a single border or outline, you could have outlined text with a shadow, or shadowed text with an outline around the shadow etc..