diff options
-rw-r--r-- | core/core_bind.cpp | 6 | ||||
-rw-r--r-- | doc/classes/OS.xml | 15 | ||||
-rw-r--r-- | misc/dist/html/editor.html | 34 |
3 files changed, 38 insertions, 17 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 457a110054..4845f5f1ae 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -715,9 +715,9 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("shell_open", "uri"), &_OS::shell_open); ClassDB::bind_method(D_METHOD("get_process_id"), &_OS::get_process_id); - ClassDB::bind_method(D_METHOD("get_environment", "environment"), &_OS::get_environment); - ClassDB::bind_method(D_METHOD("set_environment", "environment", "value"), &_OS::set_environment); - ClassDB::bind_method(D_METHOD("has_environment", "environment"), &_OS::has_environment); + ClassDB::bind_method(D_METHOD("get_environment", "variable"), &_OS::get_environment); + ClassDB::bind_method(D_METHOD("set_environment", "variable", "value"), &_OS::set_environment); + ClassDB::bind_method(D_METHOD("has_environment", "variable"), &_OS::has_environment); ClassDB::bind_method(D_METHOD("get_name"), &_OS::get_name); ClassDB::bind_method(D_METHOD("get_cmdline_args"), &_OS::get_cmdline_args); diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 6a59f24ac2..de3e9a8e10 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -207,10 +207,11 @@ <method name="get_environment" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="environment" type="String"> + <argument index="0" name="variable" type="String"> </argument> <description> - Returns an environment variable. + Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist. + [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="get_executable_path" qualifiers="const"> @@ -383,10 +384,11 @@ <method name="has_environment" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="environment" type="String"> + <argument index="0" name="variable" type="String"> </argument> <description> - Returns [code]true[/code] if an environment variable exists. + Returns [code]true[/code] if the environment variable with the name [code]variable[/code] exists. + [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="has_feature" qualifiers="const"> @@ -504,12 +506,13 @@ <method name="set_environment" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="environment" type="String"> + <argument index="0" name="variable" type="String"> </argument> <argument index="1" name="value" type="String"> </argument> <description> - Change the value of an environment variable. + Sets the value of the environment variable [code]variable[/code] to [code]value[/code]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated. + [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="set_thread_name"> diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html index b4a8c69cc6..b0b906270b 100644 --- a/misc/dist/html/editor.html +++ b/misc/dist/html/editor.html @@ -5,8 +5,7 @@ <meta name='viewport' content='width=device-width, user-scalable=no' /> <link id='-gd-engine-icon' rel='icon' type='image/png' href='favicon.png' /> <title>Godot Engine Web Editor ($GODOT_VERSION)</title> - <style type='text/css'> - + <style> *:focus { /* More visible outline for better keyboard navigation. */ outline: 0.125rem solid hsl(220, 100%, 62.5%); @@ -40,13 +39,30 @@ filter: brightness(82.5%); } + #tabs-buttons { + /* Match the default background color of the editor window for a seamless appearance. */ + background-color: #202531; + } + + #tab-game { + /* Use a pure black background to better distinguish the running project */ + /* from the editor window, and to use a more neutral background color (no tint). */ + background-color: black; + /* Make the background span the entire page height. */ + min-height: 100vh; + } + #canvas, #gameCanvas { display: block; margin: 0; color: white; } - #canvas:focus, #gameCanvas:focus { + /* Don't show distracting focus outlines for the main tabs' contents. */ + #tab-editor canvas:focus, + #tab-game canvas:focus, + #canvas:focus, + #gameCanvas:focus { outline: none; } @@ -200,9 +216,11 @@ <a href="demo.zip">(Try this for example)</a> <br /> <br /> - <button id="startButton" class="btn" style="margin-bottom: 4rem">Start Godot editor</button> + <button id="startButton" class="btn" style="margin-bottom: 4rem; font-weight: 700">Start Godot editor</button> + <br /> + <button class="btn" onclick="clearPersistence()" style="margin-bottom: 1.5rem">Clear persistent data</button> <br /> - <button class="btn" onclick="clearPersistence()">Clear persistent data</button> + <a href="https://docs.godotengine.org/en/latest/tutorials/editor/using_the_web_editor.html">Web editor documentation</a> </div> </div> <div id='tab-editor' style="display: none;"> @@ -233,8 +251,8 @@ </div> </div> - <script type='text/javascript' src='godot.tools.js'></script> - <script type='text/javascript'>//<![CDATA[ + <script src='godot.tools.js'></script> + <script>//<![CDATA[ var editor = null; var game = null; @@ -258,7 +276,7 @@ }); } - if (!window.confirm("Are you sure you want to delete all the locally stored files?")) { + if (!window.confirm("Are you sure you want to delete all the locally stored files?\nClicking \"OK\" will permanently remove your projects and editor settings!")) { return; } Promise.all([ |