diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/gdnative/gdnative.cpp | 4 | ||||
| -rw-r--r-- | modules/gdnative/godot/string.h | 2 | ||||
| -rw-r--r-- | modules/gdscript/gd_editor.cpp | 3 | ||||
| -rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 2 | ||||
| -rw-r--r-- | modules/visual_script/visual_script.cpp | 13 | ||||
| -rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 1 | ||||
| -rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 2 |
7 files changed, 15 insertions, 12 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 440cc45479..fc4fc5c10d 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -229,7 +229,7 @@ bool GDNative::initialize() { godot_gdnative_init_options options; - options.in_editor = SceneTree::get_singleton()->is_editor_hint(); + options.in_editor = Engine::get_singleton()->is_editor_hint(); options.core_api_hash = ClassDB::get_api_hash(ClassDB::API_CORE); options.editor_api_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR); options.no_api_hash = ClassDB::get_api_hash(ClassDB::API_NONE); @@ -265,7 +265,7 @@ bool GDNative::terminate() { // TODO(karroffel): remove this? Should be part of NativeScript, not // GDNative IMO godot_gdnative_terminate_options options; - options.in_editor = SceneTree::get_singleton()->is_editor_hint(); + options.in_editor = Engine::get_singleton()->is_editor_hint(); library_terminate_pointer(&options); diff --git a/modules/gdnative/godot/string.h b/modules/gdnative/godot/string.h index c901ce36e6..7695cd7931 100644 --- a/modules/gdnative/godot/string.h +++ b/modules/gdnative/godot/string.h @@ -172,7 +172,7 @@ void GDAPI godot_string_utf8(godot_string *p_self, char *result); godot_bool GDAPI godot_string_parse_utf8(godot_string *p_self, const char *p_utf8); godot_bool GDAPI godot_string_parse_utf8_with_len(godot_string *p_self, const char *p_utf8, godot_int p_len); godot_string GDAPI godot_string_chars_to_utf8(const char *p_utf8); -godot_string GDAPI godot_string_chars_utf8_with_len(const char *p_utf8, godot_int p_len); +godot_string GDAPI godot_string_chars_to_utf8_with_len(const char *p_utf8, godot_int p_len); uint32_t GDAPI godot_string_hash(const godot_string *p_self); uint64_t GDAPI godot_string_hash64(const godot_string *p_self); diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index f8b45af85a..3fa0a38024 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -35,6 +35,7 @@ #ifdef TOOLS_ENABLED #include "editor/editor_file_system.h" #include "editor/editor_settings.h" +#include "engine.h" #endif void GDScriptLanguage::get_comment_delimiters(List<String> *p_delimiters) const { @@ -2371,7 +2372,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base String GDScriptLanguage::_get_indentation() const { #ifdef TOOLS_ENABLED - if (SceneTree::get_singleton()->is_editor_hint()) { + if (Engine::get_singleton()->is_editor_hint()) { bool use_space_indentation = EDITOR_DEF("text_editor/indent/type", 0); if (use_space_indentation) { diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 38f58799df..7bb80c2510 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -1203,7 +1203,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { edit_mode = memnew(OptionButton); edit_mode->set_area_as_parent_rect(); edit_mode->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_BEGIN, 24); - edit_mode->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -14); + edit_mode->set_margin(MARGIN_RIGHT, -14); edit_mode->add_item("Tiles"); edit_mode->add_item("Areas"); hb->add_child(edit_mode); diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index d1cf0f1dce..b4bdbe16b4 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -273,7 +273,7 @@ void VisualScript::_node_ports_changed(int p_id) { Function &func = functions[function]; Ref<VisualScriptNode> vsn = func.nodes[p_id].node; - if (OS::get_singleton()->get_main_loop() && OS::get_singleton()->get_main_loop()->cast_to<SceneTree>() && OS::get_singleton()->get_main_loop()->cast_to<SceneTree>()->is_editor_hint()) { + if (OS::get_singleton()->get_main_loop() && OS::get_singleton()->get_main_loop()->cast_to<SceneTree>() && Engine::get_singleton()->is_editor_hint()) { vsn->validate_input_default_values(); //force validate default values when editing on editor } @@ -1578,12 +1578,15 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p VisualScriptNodeInstance::StartMode start_mode; { - if (p_resuming_yield) + if (p_resuming_yield) { start_mode = VisualScriptNodeInstance::START_MODE_RESUME_YIELD; - else if (!flow_stack || !(flow_stack[flow_stack_pos] & VisualScriptNodeInstance::FLOW_STACK_PUSHED_BIT)) //if there is a push bit, it means we are continuing a sequence - start_mode = VisualScriptNodeInstance::START_MODE_BEGIN_SEQUENCE; - else + p_resuming_yield = false; // should resume only the first time + } else if (flow_stack && (flow_stack[flow_stack_pos] & VisualScriptNodeInstance::FLOW_STACK_PUSHED_BIT)) { + //if there is a push bit, it means we are continuing a sequence start_mode = VisualScriptNodeInstance::START_MODE_CONTINUE_SEQUENCE; + } else { + start_mode = VisualScriptNodeInstance::START_MODE_BEGIN_SEQUENCE; + } } VSDEBUG("STEP - STARTSEQ: " + itos(start_mode)); diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 9a1033e954..b9e7a6ffc4 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -3279,7 +3279,6 @@ VisualScriptEditor::VisualScriptEditor() { select_func_text->set_valign(Label::VALIGN_CENTER); select_func_text->set_h_size_flags(SIZE_EXPAND_FILL); add_child(select_func_text); - graph->set_area_as_parent_rect(); hint_text = memnew(Label); hint_text->set_anchor_and_margin(MARGIN_TOP, ANCHOR_END, -100); diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index afdf50027e..e94bb8fba5 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -1164,7 +1164,7 @@ void VisualScriptPropertySet::_update_cache() { if (!OS::get_singleton()->get_main_loop()->cast_to<SceneTree>()) return; - if (!OS::get_singleton()->get_main_loop()->cast_to<SceneTree>()->is_editor_hint()) //only update cache if editor exists, it's pointless otherwise + if (!Engine::get_singleton()->is_editor_hint()) //only update cache if editor exists, it's pointless otherwise return; if (call_mode == CALL_MODE_BASIC_TYPE) { |
