From 8de7cdea8da3b4f0c2cf941db898f9531eaa7e75 Mon Sep 17 00:00:00 2001 From: Alexey Gulev Date: Sun, 27 Dec 2020 11:22:17 +0100 Subject: [PATCH] fix for 1.2.178 --- example/engine_template.html | 23 ++++++++++------------- example/example.script | 2 +- game.project | 2 ++ jstodef/lib/web/lib_jstodef.js | 10 +++++----- 4 files changed, 18 insertions(+), 19 deletions(-) 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); - } +