Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-205 Dim wires when using highlight_selected_connections #276

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/editor/graph/graph_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,14 @@ void OrchestratorGraphEdit::_on_node_selected(Node* p_node)
selected_nodes.push_back(other->get_script_node());
});

if (!selected_nodes.is_empty())
{
for_each_graph_node([&](OrchestratorGraphNode* node) {
node->set_all_inputs_opacity(0.3f);
node->set_all_outputs_opacity(0.3f);
});
}

List<Ref<OScriptNode>> linked_nodes;
for (const Ref<OScriptNode>& selected : selected_nodes)
{
Expand Down Expand Up @@ -940,6 +948,8 @@ void OrchestratorGraphEdit::_on_node_deselected(Node* p_node)
{
for_each_graph_node([&](OrchestratorGraphNode* other) {
other->set_modulate(Color(1, 1, 1, 1.0));
other->set_all_inputs_opacity();
other->set_all_outputs_opacity();
});
}
else
Expand Down
Loading