Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FlxText applyMarkup for markers with length > 1. #1908

Merged
merged 1 commit into from
Aug 21, 2016

Conversation

bendmorris
Copy link
Contributor

I tried using applyMarkup with some colored text tags, using multi-character markers which all start with the same character, like [red], [blue], [green]. The current implementation only looks at the first character of the marker, so each left brace matches every marker, resulting in the positions of the format ranges being off. Doing a full comparison against the marker fixes this issue.

Before:

screen shot 2016-08-20 at 11 08 31 pm

After (correct):

screen shot 2016-08-20 at 11 07 43 pm

@Gama11 Gama11 added this to the 4.2.0 milestone Aug 21, 2016
@Gama11
Copy link
Member

Gama11 commented Aug 21, 2016

Thanks! Great-looking game btw. :)

@Gama11 Gama11 merged commit f76f988 into HaxeFlixel:dev Aug 21, 2016
Gama11 added a commit that referenced this pull request Aug 21, 2016
This makes them more dox-friendly. Also added an example for multi-character markers in applyMarkup() (see #1908).
[skip ci]
Gama11 added a commit to HaxeFlixel/flixel-demos that referenced this pull request Aug 21, 2016
…kup()

see HaxeFlixel/flixel#1908
Removed some odd code in update() - presuambly leftover debugging code.
@Gama11
Copy link
Member

Gama11 commented Aug 21, 2016

I added an example of this to the demo: HaxeFlixel/flixel-demos@e218192

Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this pull request Apr 18, 2018
Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this pull request Apr 18, 2018
This makes them more dox-friendly. Also added an example for multi-character markers in applyMarkup() (see HaxeFlixel#1908).
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants