diff --git a/example/engine_template.html b/example/engine_template.html index ce83161..727c176 100644 --- a/example/engine_template.html +++ b/example/engine_template.html @@ -43,6 +43,10 @@ vertical-align: bottom; } + #canvas-container { + position: relative; + } + canvas:focus, canvas:active { outline: none; border: 0; @@ -66,7 +70,9 @@
- +
+ +
{{#html5.show_fullscreen_button}}
Fullscreen
@@ -86,6 +92,7 @@ }, engine_arguments: [{{#DEFOLD_ENGINE_ARGUMENTS}}"{{.}}",{{/DEFOLD_ENGINE_ARGUMENTS}}], custom_heap_size: {{DEFOLD_HEAP_SIZE}}, + full_screen_container: "#canvas-container", disable_context_menu: true } @@ -184,20 +191,10 @@ resize_game_canvas(); window.addEventListener('resize', resize_game_canvas, false); window.addEventListener('orientationchange', resize_game_canvas, false); - - function load_engine() { - var engineJS = document.createElement('script'); - engineJS.type = 'text/javascript'; - if (Module['isWASMSupported']) { - engineJS.src = '{{exe-name}}_wasm.js'; - } else { - engineJS.src = '{{exe-name}}_asmjs.js'; - } - document.head.appendChild(engineJS); - } +