Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation based the decision of which char is a word separator on the location of the device but some games let the user decide the language from a settings, so it is good to let them the choice.
I added these option for the developer to choose from:
WordSeparatorBasedOnDevice:
current implementationWordSeparatorSpaceSlashNotHighUnicode:
Spaces and '-' will be consider words separators. Recommended for KoreanWordSeparatorSpaceSlashAndKCJ:
Spaces, '-' and KCJ unicodes will be consider words separators. Recommended for SpanishYou can see the test on:
Node:UI > GUI Dynamic Create Test > RichTest Test > language
The function findSplitPositionForWord receives the parameter wordSeparatorMode and chooses the inline function (
charWrappableFunctionPointer
) to be use ingetNextWordPos
and then instd::find_if
to look for a good spot to but the sentence.To make the decision I use these facts: