summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml20
-rw-r--r--platform/osx/os_osx.mm2
-rw-r--r--scene/resources/material.h2
4 files changed, 23 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index ef382c0a19..ab41019ac3 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6121,7 +6121,7 @@ EditorNode::EditorNode() {
p = debug_menu->get_popup();
p->set_hide_on_window_lose_focus(true);
- p->set_hide_on_item_selection(false);
+ p->set_hide_on_checkable_item_selection(false);
p->add_check_shortcut(ED_SHORTCUT("editor/deploy_with_remote_debug", TTR("Deploy with Remote Debug")), RUN_DEPLOY_REMOTE_DEBUG);
p->set_item_tooltip(p->get_item_count() - 1, TTR("When exporting or deploying, the resulting executable will attempt to connect to the IP of this computer in order to be debugged."));
p->add_check_shortcut(ED_SHORTCUT("editor/small_deploy_with_network_fs", TTR("Small Deploy with Network FS")), RUN_FILE_SERVER);
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 840971dcf8..10eb719235 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -1363,6 +1363,26 @@
Stops the function execution and returns the current suspended state to the calling function.
From the caller, call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state. Within the resumed function, [code]yield()[/code] returns whatever was passed to the [code]resume()[/code] function call.
If passed an object and a signal, the execution is resumed when the object emits the given signal. In this case, [code]yield()[/code] returns the argument passed to [code]emit_signal()[/code] if the signal takes only one argument, or an array containing all the arguments passed to [code]emit_signal()[/code] if the signal takes multiple arguments.
+ You can also use [code]yield[/code] to wait for a function to finish:
+ [codeblock]
+ func _ready -> void:
+ yield(do_something(), "completed")
+ yield(do_something_else(), "completed")
+ print("All functions are done!")
+
+ func do_something():
+ print("Something is done!")
+
+ func do_something_else():
+ print("Something else is done!")
+
+ # prints:
+ # Something is done!
+ # Something else is done!
+ # All functions are done!
+ [/codeblock]
+ When yielding on a function, the [code]completed[/code] signal will be emitted automatically when the function returns. It can, therefore, be used as the [code]signal[/code] parameter of the [code]yield[/code] method to resume.
+ If you are planning on calling the same function within a loop, you should consider using [code]yield(get_tree(), "idle_frame")[/code] also.
</description>
</method>
</methods>
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index e5166d102b..dac6721fb4 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -2224,7 +2224,7 @@ Error OS_OSX::shell_open(String p_uri) {
}
String OS_OSX::get_locale() const {
- NSString *locale_code = [[NSLocale currentLocale] localeIdentifier];
+ NSString *locale_code = [[NSLocale preferredLanguages] objectAtIndex:0];
return [locale_code UTF8String];
}
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 1c69a754b6..11f8f20cf3 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -252,7 +252,7 @@ private:
uint64_t flags : 18;
uint64_t detail_blend_mode : 2;
uint64_t diffuse_mode : 3;
- uint64_t specular_mode : 2;
+ uint64_t specular_mode : 3;
uint64_t invalid_key : 1;
uint64_t deep_parallax : 1;
uint64_t billboard_mode : 2;