Skip to content

Commit

Permalink
Center status display in web export per flexbox
Browse files Browse the repository at this point in the history
- Fix mouse button press events not arriving in canvas
- Fix right mouse button click on canvas opening context menu
  • Loading branch information
leonkrause committed Jan 20, 2016
1 parent 1103e99 commit 42b5715
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions tools/html_fs/godot.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,15 @@
top: 0;
right: 0;
bottom: 0;
}

#status-table {
/* vertical centering per table... */
display: table;
width: 100%;
height: 100%;
}

#status-table-cell {
display: table-cell;
vertical-align: middle;
display: flex;
justify-content: center;
align-items: center;
/* don't consume click events - make children visible explicitly */
visibility: hidden;
}

#status {
/* hidden until explicitly shown in debug mode */
visibility: hidden;
visibility: visible;
padding: 4px 6px;
}

Expand Down Expand Up @@ -184,9 +176,9 @@
<canvas id="canvas" width="$GODOT_CANVAS_WIDTH" height="$GODOT_CANVAS_HEIGHT" onclick="canvas.ownerDocument.defaultView.focus();" oncontextmenu="event.preventDefault();">
HTML5 canvas appears to be unsupported in the current browser.<br />Please try updating or use a different browser.
</canvas>
<div id="status-container"><div id="status-table"><div id="status-table-cell">
<div id="status-container">
<span id="status" class="godot" onclick="this.style.visibility='hidden';">Loading page...</span>
</div></div></div>
</div>
<div id="controls" class="godot">
<label id="display-output"><input id="output-toggle" type="checkbox" autocomplete="off" onchange="Presentation.setOutputVisible(this.checked);" />display output</label>
<!-- hidden until implemented
Expand Down

0 comments on commit 42b5715

Please sign in to comment.