You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Merge pull request #8417 from neikeq/hello-there
External editor improvements and fixes
This commit is contained in:
@@ -1073,6 +1073,18 @@ void VisualScript::get_script_property_list(List<PropertyInfo> *p_list) const {
|
||||
}
|
||||
}
|
||||
|
||||
int VisualScript::get_member_line(const StringName &p_member) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (has_function(p_member)) {
|
||||
for (Map<int, Function::NodeData>::Element *E = functions[p_member].nodes.front(); E; E = E->next()) {
|
||||
if (E->get().node->cast_to<VisualScriptFunction>())
|
||||
return E->key();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
bool VisualScript::are_subnodes_edited() const {
|
||||
|
||||
|
||||
@@ -356,6 +356,8 @@ public:
|
||||
|
||||
virtual void get_script_property_list(List<PropertyInfo> *p_list) const;
|
||||
|
||||
virtual int get_member_line(const StringName &p_member) const;
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
virtual bool are_subnodes_edited() const;
|
||||
#endif
|
||||
|
||||
@@ -2153,7 +2153,7 @@ void VisualScriptEditor::goto_line(int p_line, bool p_with_error) {
|
||||
_update_graph();
|
||||
_update_members();
|
||||
|
||||
call_deferred("_center_on_node", p_line); //editor might be just created and size might not exist yet
|
||||
call_deferred("call_deferred", "_center_on_node", p_line); //editor might be just created and size might not exist yet
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2198,18 +2198,6 @@ void VisualScriptEditor::get_breakpoints(List<int> *p_breakpoints) {
|
||||
}
|
||||
}
|
||||
|
||||
bool VisualScriptEditor::goto_method(const String &p_method) {
|
||||
|
||||
if (!script->has_function(p_method))
|
||||
return false;
|
||||
|
||||
edited_func = p_method;
|
||||
selected = edited_func;
|
||||
_update_members();
|
||||
_update_graph();
|
||||
return true;
|
||||
}
|
||||
|
||||
void VisualScriptEditor::add_callback(const String &p_function, PoolStringArray p_args) {
|
||||
|
||||
if (script->has_function(p_function)) {
|
||||
|
||||
@@ -246,7 +246,6 @@ public:
|
||||
virtual void tag_saved_version();
|
||||
virtual void reload(bool p_soft);
|
||||
virtual void get_breakpoints(List<int> *p_breakpoints);
|
||||
virtual bool goto_method(const String &p_method);
|
||||
virtual void add_callback(const String &p_function, PoolStringArray p_args);
|
||||
virtual void update_settings();
|
||||
virtual void set_debugger_active(bool p_active);
|
||||
|
||||
Reference in New Issue
Block a user