Twemoji Picker

This commit is contained in:
_Bastler
2021-07-21 18:54:43 +02:00
parent 3ccc471d2f
commit 39561b315c
7 changed files with 185 additions and 68 deletions
-7
View File
@@ -2,8 +2,6 @@ import {emoteEventStream} from "../../Connexion/EmoteEventStream";
import type {GameScene} from "./GameScene";
import type {Subscription} from "rxjs";
export const emotes: string[] = ['❤️', '👏', '✋', '🍻', '🥂', '👌', '👎', '💯','❗️', '❓','🎶'];
export class EmoteManager {
private subscription: Subscription;
@@ -16,11 +14,6 @@ export class EmoteManager {
})
}
getEmotes(): string[] {
// TODO: localstorage + management
return emotes;
}
destroy() {
this.subscription.unsubscribe();
}
+1 -1
View File
@@ -1353,7 +1353,7 @@ export class GameScene extends DirtyScene {
return; //we don't want the menu to open when pinching on a touch screen.
}
this.CurrentPlayer.openOrCloseEmoteMenu( this.emoteManager.getEmotes());
this.CurrentPlayer.openOrCloseEmoteMenu();
})
this.CurrentPlayer.on(requestEmoteEventName, (emoteKey: string) => {
this.connection?.emitEmoteEvent(emoteKey);