https://github.com/brentstrandy/phaser-underline-text
Extends Phaser.Text to easily let you add underlines anywhere in your text
https://github.com/brentstrandy/phaser-underline-text
Last synced: 7 months ago
JSON representation
Extends Phaser.Text to easily let you add underlines anywhere in your text
- Host: GitHub
- URL: https://github.com/brentstrandy/phaser-underline-text
- Owner: brentstrandy
- Created: 2017-03-13T06:30:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-13T06:51:55.000Z (over 9 years ago)
- Last Synced: 2024-05-17T12:32:54.705Z (about 2 years ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-phaser - Underline text - Extends Phaser.Text to easily let you add underlines anywhere in your text (Uncategorized / Uncategorized)
README
# Phaser UnderlineText
## Features
- Keep all functionality of Phaser.Text object
- Add as many underlines as needed
- Works with variable font sizes
- Works with variable line spacing
- Works with word wrap
## Example
```
this.myTextObj = new UnderlineText(this.game, 84, 79, 'Hello World', { font: '18px Verdana', fill: '#000000' });
this.myTextObj.addUnderline(0, 4);
...
this.myTextObj.clearUnderlines();
this.myTextObj.addUnderline(10, 20);
this.myTextObj.addUnderline(22, 10);
```