FEAT: prototype game menu using html elements, better icon for text chat
This commit is contained in:
parent
855b55903b
commit
069f2f1cec
23 changed files with 520 additions and 226 deletions
11
front/src/Phaser/Components/ChatModeIcon.ts
Normal file
11
front/src/Phaser/Components/ChatModeIcon.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
export class ChatModeIcon extends Phaser.GameObjects.Sprite {
|
||||
constructor(scene: Phaser.Scene, x: number, y: number) {
|
||||
super(scene, x, y, 'layout_modes', 3);
|
||||
scene.add.existing(this);
|
||||
this.setScrollFactor(0, 0);
|
||||
this.setOrigin(0, 1);
|
||||
this.setInteractive();
|
||||
this.setVisible(false);
|
||||
this.setDepth(99999);
|
||||
}
|
||||
}
|
18
front/src/Phaser/Components/OpenChatIcon.ts
Normal file
18
front/src/Phaser/Components/OpenChatIcon.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import {discussionManager} from "../../WebRtc/DiscussionManager";
|
||||
|
||||
export const openChatIconName = 'openChatIcon';
|
||||
export class OpenChatIcon extends Phaser.GameObjects.Image {
|
||||
constructor(scene: Phaser.Scene, x: number, y: number) {
|
||||
super(scene, x, y, openChatIconName);
|
||||
scene.add.existing(this);
|
||||
this.setScrollFactor(0, 0);
|
||||
this.setOrigin(0, 1);
|
||||
this.displayWidth = 30;
|
||||
this.displayHeight = 30;
|
||||
this.setInteractive();
|
||||
this.setVisible(false)
|
||||
this.setDepth(99999);
|
||||
|
||||
this.on("pointerup", () => discussionManager.showDiscussionPart());
|
||||
}
|
||||
}
|
11
front/src/Phaser/Components/PresentationModeIcon.ts
Normal file
11
front/src/Phaser/Components/PresentationModeIcon.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
export class PresentationModeIcon extends Phaser.GameObjects.Sprite {
|
||||
constructor(scene: Phaser.Scene, x: number, y: number) {
|
||||
super(scene, x, y, 'layout_modes', 0);
|
||||
scene.add.existing(this);
|
||||
this.setScrollFactor(0, 0);
|
||||
this.setOrigin(0, 1);
|
||||
this.setInteractive();
|
||||
this.setVisible(false);
|
||||
this.setDepth(99999);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue