Zindex top controls so at least the firefox bug doesn't stop them from being used.

Added in button to hit first if query params are used so modern browsers dont freak out about audio.
This commit is contained in:
fire bingo 2018-05-23 22:22:40 -07:00
parent d101cd9ff0
commit 4e982cdd3d
3 changed files with 8 additions and 8 deletions

View File

@ -102,7 +102,7 @@ body { margin: 0; }
#title-container { margin-bottom: 2px; }
#other-controls-container { display: flex; width: 550px; justify-content: center; }
#other-controls-container { display: flex; width: 550px; justify-content: center; z-index: 10; }
#select-mission { min-width: 0; }

View File

@ -71,9 +71,6 @@ function onAllLoaded(success) {
onWindowResize();
window.addEventListener("resize", onWindowResize);
checkQueryParameters();
//Firefox52 hack for weird sizing thing.
document.body.style.zoom = 1.0000001;
setTimeout(function(){document.body.style.zoom = 1;},50);
}, 0);
}
@ -153,10 +150,15 @@ function buildLanguageList() {
function checkQueryParameters() {
urlParams = commonFunctions.readQueryParameters();
if(urlParams['mstid'] && urlParams['id'] && utage.groupedMissions[urlParams['mstid']] && utage.groupedMissions[urlParams['mstid']].Missions[urlParams['id']]) {
missionChanged(urlParams['mstid'], urlParams['id']);
document.getElementById('play-from-query').style.cssText = "position: fixed; z-index: 15; text-align: center; top: 50%; left: 50%; display: block;";
}
}
function playFromQuery(event) {
missionChanged(urlParams['mstid'], urlParams['id']);
document.getElementById('play-from-query').style.cssText = "display: none;";
}
function missionDropDownChanged(event) {
if(!event || !event.currentTarget || !event.currentTarget.value || event.currentTarget.value === '{Select}') { return; }
let cont = document.getElementById("modal-container");
@ -358,8 +360,5 @@ function onWindowResize(event) {
let res = commonFunctions.getNewResolution(baseDimensions, screenw, screenh, topContainerHeight);
player.updateResolution(res);
document.getElementById('app-container').style.cssText = `width: ${res.width}px; height: ${res.height}px;`;
//Firefox52 hack for weird sizing thing.
document.body.style.zoom = 1.0000001;
setTimeout(function(){document.body.style.zoom = 1;},50);
}, 400);
}

View File

@ -34,6 +34,7 @@
<div id="app-container" onclick="onMainClick(event);">
<div id="text-container">
<img id="main-ui-img" class="hidden" src="Images/newui_main.png"/>
<button id="play-from-query" onclick="playFromQuery(event)" style="display: none;">Play</button>
<div id="title" class="hidden">Title Text</div>
<div id="diva" class="hidden">Diva Text</div>
<div id="dialog-box" class="hidden">