diff --git a/CHANGELOG.md b/CHANGELOG.md index dec14540..d9afd71e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ - The emote menu can be opened by clicking on your character. - Clicking on one of its element will close the menu and play an emote above your character. - This emote can be seen by other players. +- Player names were improved. (@Kharhamel) + - We now create a GameObject.Text instead of GameObject.BitmapText + - now use the 'Press Start 2P' font family and added an outline + - As a result, we can now allow non-standard letters like french accents or chinese characters! + - Mobile support has been improved - WorkAdventure automatically sets the zoom level based on the viewport size to ensure a sensible size of the map is visible, whatever the viewport used - Mouse wheel support to zoom in / out diff --git a/front/dist/index.tmpl.html b/front/dist/index.tmpl.html index 17d3e4f9..5a031dc9 100644 --- a/front/dist/index.tmpl.html +++ b/front/dist/index.tmpl.html @@ -27,7 +27,7 @@ - + Partey diff --git a/front/dist/resources/fonts/fonts.css b/front/dist/resources/fonts/fonts.css index e54da894..a3d3cf71 100644 --- a/front/dist/resources/fonts/fonts.css +++ b/front/dist/resources/fonts/fonts.css @@ -1,4 +1,5 @@ +/*This file is a workaround to allow phaser to load directly this font */ @font-face { - font-family: "Press Start 2P"; - src: url("/fonts/press-start-2p-latin-400-normal.woff2") format('woff2'); + font-family: "Press Start 2P"; + src: url("/fonts/press-start-2p-latin-400-normal.woff2") format('woff2'); } \ No newline at end of file diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 6ea461a5..bc6b84fa 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -291,7 +291,6 @@ export class GameScene extends DirtyScene implements CenterListener { testString: 'abcdefg' }, }); - //this function must stay at the end of preload function addLoader(this); } diff --git a/front/style/index.scss b/front/style/index.scss index 7f7ca978..a1cf5637 100644 --- a/front/style/index.scss +++ b/front/style/index.scss @@ -4,4 +4,4 @@ @import "cowebsite-mobile.scss"; @import "style.css"; @import "mobile-style.scss"; -@import "fonts"; \ No newline at end of file +@import "fonts.scss"; diff --git a/front/tests/Phaser/Connexion/LocalUserTest.ts b/front/tests/Phaser/Connexion/LocalUserTest.ts index 25b54005..4ba20745 100644 --- a/front/tests/Phaser/Connexion/LocalUserTest.ts +++ b/front/tests/Phaser/Connexion/LocalUserTest.ts @@ -19,8 +19,14 @@ describe("isUserNameValid()", () => { it("should not validate spaces", () => { expect(isUserNameValid(' ')).toBe(false); }); - it("should not validate special characters", () => { - expect(isUserNameValid('a&-')).toBe(false); + it("should validate special characters", () => { + expect(isUserNameValid('%&-')).toBe(true); + }); + it("should validate accents", () => { + expect(isUserNameValid('éàëè')).toBe(true); + }); + it("should validate chinese characters", () => { + expect(isUserNameValid('中文鍵盤')).toBe(true); }); });