|
@@ -7,6 +7,9 @@ import UserService from '../../services/UserService';
|
|
|
|
|
|
import Text from '../misc/Text';
|
|
import Text from '../misc/Text';
|
|
import Button from '../misc/Button';
|
|
import Button from '../misc/Button';
|
|
|
|
+
|
|
|
|
+import SocketService from '../../services/SocketService';
|
|
|
|
+
|
|
const BlueURL = '/files/assets/cards/frame_blue.png';
|
|
const BlueURL = '/files/assets/cards/frame_blue.png';
|
|
const BlueImage = PIXI.Texture.fromImage(BlueURL);
|
|
const BlueImage = PIXI.Texture.fromImage(BlueURL);
|
|
|
|
|
|
@@ -43,7 +46,10 @@ class Menu extends GuiableContainer{
|
|
this.textSprite.setText(UserService.getUsername() + ':' + UserService.getToken());
|
|
this.textSprite.setText(UserService.getUsername() + ':' + UserService.getToken());
|
|
|
|
|
|
let play = new Button({ y:-100 , Text: {text: "Play"}});
|
|
let play = new Button({ y:-100 , Text: {text: "Play"}});
|
|
- play.onClick((e) => alert(e));
|
|
|
|
|
|
+ play.onClick((e) => {
|
|
|
|
+ SocketService.openSocket('randomFree');
|
|
|
|
+ });
|
|
|
|
+
|
|
let collection = new Button({ y:50 , Text: {text: "Collection"}});
|
|
let collection = new Button({ y:50 , Text: {text: "Collection"}});
|
|
collection.onClick((e) => alert(e));
|
|
collection.onClick((e) => alert(e));
|
|
let logout = new Button({ y:200 , Text: {text: "Logout"}});
|
|
let logout = new Button({ y:200 , Text: {text: "Logout"}});
|