feat: Support text align on new text rendering pipeline (#3147)

Support text align on new text rendering pipeline.

![image](https://github.com/flame-engine/flame/assets/882703/62f91c8e-f38f-48b0-8c59-06efb10acdf3)

![image](https://github.com/flame-engine/flame/assets/882703/b00afb90-6051-4a2c-aac6-ac36ea1bcba2)
This commit is contained in:
Luan Nico
2024-05-06 08:13:10 -04:00
committed by GitHub
parent ce9392abd8
commit 194d553656
4 changed files with 44 additions and 2 deletions

View File

@ -67,7 +67,15 @@ void addRenderingStories(Dashbook dashbook) {
)
..add(
'Rich Text',
(_) => GameWidget(game: RichTextExample()),
(context) => GameWidget(
game: RichTextExample(
textAlign: context.listProperty(
'Text align',
TextAlign.left,
TextAlign.values,
),
),
),
codeLink: baseLink('rendering/rich_text_example.dart'),
info: RichTextExample.description,
);