diff options
Diffstat (limited to 'misc')
| -rw-r--r-- | misc/dist/html/editor.html | 53 | ||||
| -rw-r--r-- | misc/dist/shell/_godot.zsh-completion | 4 | ||||
| -rw-r--r-- | misc/dist/shell/godot.bash-completion | 2 | ||||
| -rw-r--r-- | misc/dist/shell/godot.fish | 4 |
4 files changed, 53 insertions, 10 deletions
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html index 8d436038c1..7c44dd45a1 100644 --- a/misc/dist/html/editor.html +++ b/misc/dist/html/editor.html @@ -68,6 +68,11 @@ height: 100%; overflow: auto; background-color: hsla(0, 0%, 0%, 0.5); + text-align: left; + } + + .welcome-modal-title { + text-align: center; } .welcome-modal-content { @@ -238,7 +243,7 @@ onclick="if (event.target === this) closeWelcomeModal(false)" > <div class="welcome-modal-content"> - <h2 id="welcome-modal-title">Important - Please read before continuing</h2> + <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read before continuing</h2> <div id="welcome-modal-description"> <p> The Godot Web Editor has some limitations compared to the native version. @@ -254,9 +259,38 @@ >Web editor documentation</a> for usage instructions and limitations. </p> </div> - <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem"> - OK, don't show again - </button> + <div id="welcome-modal-description-no-cross-origin-isolation" style="display: none"> + <p> + The web server does not support cross-origin isolation, + which is required for the Godot Web Editor to function. + </p> + <p> + <strong>Reasons for cross-origin isolation being disabled:</strong> + <ul> + <li id="welcome-modal-reason-not-secure"> + This page is not served from a secure context (HTTPS <i>or</i> localhost). + </li> + <li> + This page may not be served with cross-origin isolation headers + (check with the developer tools' Network tab). + </li> + </ul> + </p> + <p> + If you are self-hosting the web editor, + refer to + <a + href="https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#threads" + target="_blank" + rel="noopener" + >Exporting for the Web - Threads</a> for more information. + </p> + </div> + <div style="text-align: center"> + <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem"> + OK, don't show again + </button> + </div> </div> </div> <div id="tabs-buttons"> @@ -360,7 +394,16 @@ }); } - if (localStorage.getItem("welcomeModalDismissed") !== 'true') { + if (!crossOriginIsolated) { + // Display error dialog as threading support is required for the editor. + setButtonEnabled('startButton', false); + document.getElementById("welcome-modal-description").style.display = "none"; + document.getElementById("welcome-modal-description-no-cross-origin-isolation").style.display = "block"; + document.getElementById("welcome-modal-dismiss").style.display = "none"; + document.getElementById("welcome-modal-reason-not-secure").style.display = window.isSecureContext ? "none" : "list-item"; + } + + if (!crossOriginIsolated || localStorage.getItem("welcomeModalDismissed") !== 'true') { document.getElementById("welcome-modal").style.display = "block"; document.getElementById("welcome-modal-dismiss").focus(); } diff --git a/misc/dist/shell/_godot.zsh-completion b/misc/dist/shell/_godot.zsh-completion index aaa5fe0a06..6444ca337e 100644 --- a/misc/dist/shell/_godot.zsh-completion +++ b/misc/dist/shell/_godot.zsh-completion @@ -61,8 +61,8 @@ _arguments \ '(-b --breakpoints)'{-b,--breakpoints}'[specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)]:breakpoint list' \ '--profiling[enable profiling in the script debugger]' \ '--gpu-profile[show a GPU profile of the tasks that took the most time during frame rendering]' \ - '--vk-layers[enable Vulkan validation layers for debugging]' \ - '--gpu-abort[abort on GPU errors (usually validation layer errors)]' \ + '--gpu-validation[enable graphics API validation layers for debugging]' \ + '--gpu-abort[abort on graphics API usage errors (usually validation layer errors)]' \ '--remote-debug[enable remote debugging]:remote debugger address' \ '--debug-collisions[show collision shapes when running the scene]' \ '--debug-navigation[show navigation polygons when running the scene]' \ diff --git a/misc/dist/shell/godot.bash-completion b/misc/dist/shell/godot.bash-completion index 7927d26171..31e067e29a 100644 --- a/misc/dist/shell/godot.bash-completion +++ b/misc/dist/shell/godot.bash-completion @@ -64,7 +64,7 @@ _complete_godot_options() { --breakpoints --profiling --gpu-profile ---vk-layers +--gpu-validation --gpu-abort --remote-debug --debug-collisions diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish index c05aa74017..da4ce1190c 100644 --- a/misc/dist/shell/godot.fish +++ b/misc/dist/shell/godot.fish @@ -74,8 +74,8 @@ complete -c godot -s d -l debug -d "Debug (local stdout debugger)" complete -c godot -s b -l breakpoints -d "Specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)" -x complete -c godot -l profiling -d "Enable profiling in the script debugger" complete -c godot -l gpu-profile -d "Show a GPU profile of the tasks that took the most time during frame rendering" -complete -c godot -l vk-layers -d "Enable Vulkan validation layers for debugging" -complete -c godot -l gpu-abort -d "Abort on GPU errors (usually validation layer errors)" +complete -c godot -l gpu-validation -d "Enable graphics API validation layers for debugging" +complete -c godot -l gpu-abort -d "Abort on graphics API usage errors (usually validation layer errors)" complete -c godot -l remote-debug -d "Enable remote debugging" complete -c godot -l debug-collisions -d "Show collision shapes when running the scene" complete -c godot -l debug-navigation -d "Show navigation polygons when running the scene" |