Overhaul web export page
Created by: leonkrause
This change trims the web export page.
Changes
- Minimum size is canvas size, so no scrollbars as long as the game fits, e.g. for
iframe
- Controls as overlay, hidden until hover
- Can be disabled completely
- Status display as overlay
- Hides on click (for emergency, in case status freezes...)
- Output only visible in debug export
- Visibility can be toggled per controls
- Godot default theme style
- Should be HTML/XML polyglot (but hard to verify)
- Separate Emscripten interface
Module
logic from pagePresentation
logic - Add export options to customize page:
- Page title (
<title>
) -
<head>
include - Fonts (
font-family
) - CSS include
- Controls visibility
- Page title (
- Prevent exception when clicking fullscreen button before fully loaded
- Fix canvas being smaller than game
- Fix iframed page not regaining focus on click
Demonstration
These settings are also used for the following demonstrations.
- Debug export: https://googledrive.com/host/0B1lsc05JnCtrSUtiT25pRVdTR1k
- Release export, controls disabled, in
iframe
: https://googledrive.com/host/0B1lsc05JnCtrVXdCNWh4TTRXaVE
Closes #2774 (closed)
To do later:
- Implement canvas resize
- Substract output height when visible
- Implement fullscreen button properly
- Implement cursor lock toggle
- Less ridiculous vertical centering for status display
- Handle
webglcontextlost
event - Style checkboxes — Hacky, would have to include "check" texture
- Spinner? — Seems annoying to me, maybe a loading bar when
setStatus
cooperates