Skip to content

Commit 88cee5d

Browse files
committed
Create 7077 rtl texts.js
1 parent fa830a4 commit 88cee5d

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

public/src/bugs/7077 rtl texts.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
class MainScene extends Phaser.Scene
2+
{
3+
4+
constructor()
5+
{
6+
super({ key: "MainScene" });
7+
}
8+
9+
create ()
10+
{
11+
const rtlText1 = this.add.text(200, 100, 'Text 1', { rtl: true });
12+
rtlText1.destroy();
13+
14+
const regularText2 = this.add.text(200, 200, 'Text 2', { rtl: false }); // In Chrome / Edge, Text 2 would not be shown!
15+
16+
const regularText3 = this.add.text(200, 300, 'Text 3', { rtl: false }); // In Chrome / Edge, Text 2 would not be shown!
17+
18+
const regularText4 = this.add.text(200, 400, 'Text 4', { rtl: false }); // In Chrome / Edge, Text 2 would not be shown!
19+
20+
const regularText5 = this.add.text(200, 500, 'Text 5', { rtl: true }); // In Chrome / Edge, Text 2 would not be shown!
21+
}
22+
}
23+
24+
const config = {
25+
type: Phaser.AUTO,
26+
parent: 'phaser-example',
27+
width: 800,
28+
height: 600,
29+
pixelArt: true,
30+
scale: {
31+
mode: Phaser.Scale.FIT,
32+
autoCenter: Phaser.Scale.CENTER_BOTH
33+
},
34+
scene: [ MainScene ]
35+
};
36+
37+
const game = new Phaser.Game(config);

0 commit comments

Comments
 (0)