Merge branch 'resizeSelect' of github.com:thecodingmachine/workadventure into resizeSelect

This commit is contained in:
David Négrier 2021-06-02 12:27:54 +02:00
commit faa4c7c08e
5 changed files with 11 additions and 14 deletions

View File

@ -107,11 +107,11 @@
} }
@media only screen and (max-width: 800px) { @media only screen and (max-width: 800px) {
.customCharacterScene button.customCharacterSceneButtonLeft{ form.customCharacterScene button.customCharacterSceneButtonLeft{
left: 10vw; left: 5vw;
} }
.customCharacterScene button.customCharacterSceneButtonRight{ form.customCharacterScene button.customCharacterSceneButtonRight{
right: 10vw; right: 5vw;
} }
} }

View File

@ -80,11 +80,11 @@
} }
@media only screen and (max-width: 800px) { @media only screen and (max-width: 800px) {
.selectCharacterScene button.selectCharacterButtonLeft{ form.selectCharacterScene button.selectCharacterButtonLeft{
left: 10vw; left: 5vw;
} }
.selectCharacterScene button.selectCharacterButtonRight{ form.selectCharacterScene button.selectCharacterButtonRight{
right: 10vw; right: 5vw;
} }
} }

View File

@ -16,7 +16,7 @@ export const MAX_USERNAME_LENGTH = parseInt(process.env.MAX_USERNAME_LENGTH || '
export const MAX_PER_GROUP = parseInt(process.env.MAX_PER_GROUP || '4'); export const MAX_PER_GROUP = parseInt(process.env.MAX_PER_GROUP || '4');
export const DISPLAY_TERMS_OF_USE = process.env.DISPLAY_TERMS_OF_USE == 'true'; export const DISPLAY_TERMS_OF_USE = process.env.DISPLAY_TERMS_OF_USE == 'true';
export const isMobile = ():boolean => false;//( ( window.innerWidth <= 800 ) || ( window.innerHeight <= 600 ) ); export const isMobile = ():boolean => ( ( window.innerWidth <= 800 ) || ( window.innerHeight <= 600 ) );
export { export {
DEBUG_MODE, DEBUG_MODE,

View File

@ -242,7 +242,6 @@ export class CustomizeScene extends AbstractCharacterScene {
gameManager.setCharacterLayers(layers); gameManager.setCharacterLayers(layers);
this.scene.sleep(CustomizeSceneName); this.scene.sleep(CustomizeSceneName);
this.scene.remove(SelectCharacterSceneName);
gameManager.tryResumingGame(this, EnableCameraSceneName); gameManager.tryResumingGame(this, EnableCameraSceneName);
customCharacterSceneVisibleStore.set(false); customCharacterSceneVisibleStore.set(false);
} }
@ -251,6 +250,5 @@ export class CustomizeScene extends AbstractCharacterScene {
this.scene.sleep(CustomizeSceneName); this.scene.sleep(CustomizeSceneName);
this.scene.run(SelectCharacterSceneName); this.scene.run(SelectCharacterSceneName);
customCharacterSceneVisibleStore.set(false); customCharacterSceneVisibleStore.set(false);
selectCharacterSceneVisibleStore.set(true);
} }
} }

View File

@ -52,6 +52,7 @@ export class SelectCharacterScene extends AbstractCharacterScene {
create() { create() {
selectCharacterSceneVisibleStore.set(true); selectCharacterSceneVisibleStore.set(true);
this.events.addListener('wake', () => {selectCharacterSceneVisibleStore.set(true);});
if (touchScreenManager.supportTouchScreen) { if (touchScreenManager.supportTouchScreen) {
new PinchManager(this); new PinchManager(this);
@ -63,7 +64,6 @@ export class SelectCharacterScene extends AbstractCharacterScene {
/*create user*/ /*create user*/
this.createCurrentPlayer(); this.createCurrentPlayer();
const playerNumber = localUserStore.getPlayerCharacterIndex();
this.input.keyboard.on('keyup-ENTER', () => { this.input.keyboard.on('keyup-ENTER', () => {
return this.nextSceneToCameraScene(); return this.nextSceneToCameraScene();
@ -93,7 +93,7 @@ export class SelectCharacterScene extends AbstractCharacterScene {
this.scene.stop(SelectCharacterSceneName); this.scene.stop(SelectCharacterSceneName);
gameManager.setCharacterLayers([this.selectedPlayer.texture.key]); gameManager.setCharacterLayers([this.selectedPlayer.texture.key]);
gameManager.tryResumingGame(this, EnableCameraSceneName); gameManager.tryResumingGame(this, EnableCameraSceneName);
this.scene.remove(SelectCharacterSceneName); this.players = [];
selectCharacterSceneVisibleStore.set(false); selectCharacterSceneVisibleStore.set(false);
} }
@ -128,7 +128,6 @@ export class SelectCharacterScene extends AbstractCharacterScene {
}); });
this.players.push(player); this.players.push(player);
} }
this.selectedPlayer = this.players[this.currentSelectUser]; this.selectedPlayer = this.players[this.currentSelectUser];
this.selectedPlayer.play(this.playerModels[this.currentSelectUser].name); this.selectedPlayer.play(this.playerModels[this.currentSelectUser].name);
} }