mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-28 20:40:06 +00:00
Fix visibility of the help overlay
This commit is contained in:
parent
9b2e41ff86
commit
ed60ccf41e
5 changed files with 8 additions and 9 deletions
|
|
@ -49,7 +49,6 @@ body {
|
|||
#help-overlay {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
|
@ -66,7 +65,6 @@ body {
|
|||
#help-overlay-detail {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
position: absolute;
|
||||
|
||||
background-image: url('/static/img/help_overlay.png');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
.hidden {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.modal-window {
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@
|
|||
|
||||
<div id="noti-box" class="unselectable">Oh my god</div>
|
||||
|
||||
<div id="help-overlay">
|
||||
<div id="help-overlay-background"></div>
|
||||
<div id="help-overlay-detail"></div>
|
||||
<div id="help-overlay" class="hidden">
|
||||
<div id="help-overlay-background" class="hidden"></div>
|
||||
<div id="help-overlay-detail" class="hidden"></div>
|
||||
</div>
|
||||
<div id="btn-help" class="btn unselectable" value="help"></div>
|
||||
{{if .Recording.Enabled}}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@
|
|||
gui.toggle(keyButtons[KEY.SAVE], show || isGameScreen);
|
||||
gui.toggle(keyButtons[KEY.LOAD], show || isGameScreen);
|
||||
|
||||
gui.toggle(helpOverlay, show);
|
||||
gui.toggle(helpOverlay, show)
|
||||
Array.from(helpOverlay.children).forEach((node) => gui.toggle(node, show))
|
||||
|
||||
this.shown = show;
|
||||
|
||||
|
|
|
|||
|
|
@ -141,11 +141,11 @@ const gui = (() => {
|
|||
}
|
||||
|
||||
const show = (el) => {
|
||||
el.style.removeProperty('visibility');
|
||||
el.classList.remove('hidden');
|
||||
}
|
||||
|
||||
const hide = (el) => {
|
||||
el.style.visibility = 'hidden';
|
||||
el.classList.add('hidden');
|
||||
}
|
||||
|
||||
const toggle = (el, what) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue