/* let langState = { create: function(){}, --------------------------------------- end of phaser functions func_setLang: function(){} //calls loadState }; let loadState = { preload: function(){}, create: function(){} //calls nameState -------------------------------------- end of phaser functions }; let nameState = { create: function(){}, ------------------------------------------------ end of phaser functions func_checkEmptyName: function(){} func_saveName: function(){} //calls menu.js -> menuState }; let iconSettings = { func_addIcons: function(_,_,_,_,_,_,_,_,_){}, func_callState: function(){} }; */ // LANGUAGE SCREEN: the player can choose a preferred language for the game text to be displayed let langState = { create: function() { // Sets stage width back to default if we are back from 'menu' state where it can be extended if(this.game.world.width != defaultWidth) this.game.world.setBounds(0, 0, defaultWidth, this.game.world.height); game.stage.backgroundColor = '#cce5ff'; // Preparing and setting language screen elements const langs = { list: [], text: ['FRAÇÕES ', 'FRAZIONI ', 'FRACTIONS ', 'FRACCIONES ', 'FRACTIONS '], flag: ['flag_BR', 'flag_IT', 'flag_US', 'flag_PE', 'flag_FR' ], lang: ['pt_BR', 'it_IT', 'en_US', 'es_PE', 'fr_FR' ], x_text: [-220, -220, -220, 200, 200], x_flag: [-120, -120, -120, 300, 300], y: [-180, 0, 180, -100, 100] } for(let i=0; i