game.ui.root.querySelectorAll('.options .controls input, .options .graphics input, .options .feather input, .options .accessibility input, .options .accessibility select').forEach((elem) => {
elem.addEventListener('change', () => {
applySettings(game);
+ if(elem.name == 'upInTheAirGame-controls') {
+ game.ui.root.querySelectorAll('.options .controls p span:not(.' + game.settings['controls'] + ')').forEach(span => span.style.display = 'none');
+ game.ui.root.querySelector('.options .controls span.' + game.settings['controls']).style.display = 'block';
+ }
if(elem.value == 'highcontrast' || elem.name == 'upInTheAirGame-graphics') {
createMeshes(game);
}
}
});
});
-game.ui.root.querySelectorAll('.options .controls input').forEach((radio) => {
- radio.addEventListener('change', () => applySettings(game));
-});
-game.ui.root.querySelectorAll('.options input[name=upInTheAirGame-font]').forEach((radio) => {
- radio.addEventListener('change', () => applySettings(game));
-});
game.ui.root.querySelector('.options .keyboard button[value="reset"]').addEventListener('click', applySettings(game));
game.ui.root.querySelectorAll('.ui-page .areatabs button').forEach((btn) => {
btn.addEventListener('click', (e) => {