rexrainbow / phaser3-rex-notes

Notes of phaser3 engine
MIT License
1.18k stars 260 forks source link

Please add strikethrough for bbcode #358

Closed dtturcotte closed 1 year ago

dtturcotte commented 1 year ago

Hello,

Firstly, thanks for all of the work you've done on RexUI.

Secondly, I need to add strikethrough for your BBCode module. As you know, BBCode strikethrough is supported by BBCode standard as [s][/s]. Are you able to add it? Thank you!

rexrainbow commented 1 year ago

Feature added, see this demo, text object at left side, the last line.

[s]Last line[/s]

You can override line color via

[s=yellow]Last line[/s]

Like underline, strikethrough needs to assign color and thickness, offset (0 is baseline of this text line)

NPM package will be upgraded at end of this month.

dtturcotte commented 1 year ago

Awesome, thank you!

dtturcotte commented 1 year ago

Also note your underline [u][/u] does not work unless it has a color. https://rexrainbow.github.io/phaser3-rex-notes/docs/site/bbcodetext/#color seems to indicate you can provide a standard [u][/u] without color.

rexrainbow commented 1 year ago

[u]...[/u] is provided. From previous demo, I add [u]...[/u] to the last line of left text object

[s][u]Last line[/u][/s]

You can see the underline and strikethrough both on that text line.

The color of underline is set to #000 in this demo.