mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Connection hints when connecting to empty space.
This commit is contained in:
parent
ee37c2f433
commit
5028d7510d
10 changed files with 499 additions and 4 deletions
|
@ -574,6 +574,23 @@ bool VisualScript::is_input_value_port_connected(const StringName& p_func,int p_
|
|||
return false;
|
||||
}
|
||||
|
||||
bool VisualScript::get_input_value_port_connection_source(const StringName& p_func,int p_node,int p_port,int *r_node,int *r_port) const {
|
||||
|
||||
ERR_FAIL_COND_V(!functions.has(p_func),false);
|
||||
const Function &func = functions[p_func];
|
||||
|
||||
for (const Set<DataConnection>::Element *E=func.data_connections.front();E;E=E->next()) {
|
||||
if (E->get().to_node==p_node && E->get().to_port==p_port) {
|
||||
*r_node=E->get().from_node;
|
||||
*r_port=E->get().from_port;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
void VisualScript::get_data_connection_list(const StringName& p_func,List<DataConnection> *r_connection) const {
|
||||
|
||||
ERR_FAIL_COND(!functions.has(p_func));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue