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-632 Add new function call node color variants #633

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions src/common/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ void OrchestratorSettings::_register_settings()
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/node_colors/events", Color(0.467, 0.0, 0.0)));
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/node_colors/flow_control", Color(0.132, 0.258, 0.266)));
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/node_colors/function_call", Color(0.0, 0.2, 0.396)));
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/node_colors/orchestration_function_call", Color(0.0, 0.316, 0.601)));
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/node_colors/other_script_function_call", Color(0.027, 0.341, 0.504)));
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/node_colors/pure_function_call", Color(0.133, 0.302, 0.114)));
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/node_colors/function_terminator", Color(0.294, 0.0, 0.506)));
_settings.emplace_back(COLOR_NO_ALPHA_SETTING("ui/node_colors/function_result", Color(1.0, 0.65, 0.4)));
Expand Down
8 changes: 8 additions & 0 deletions src/script/nodes/functions/call_member_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ String OScriptNodeCallMemberFunction::get_node_title() const
return super::get_node_title();
}

String OScriptNodeCallMemberFunction::get_node_title_color_name() const
{
if (!ClassDB::class_exists(_reference.target_class_name))
return "other_script_function_call";

return "function_call";
}

String OScriptNodeCallMemberFunction::get_help_topic() const
{
#if GODOT_VERSION >= 0x040300
Expand Down
2 changes: 1 addition & 1 deletion src/script/nodes/functions/call_member_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class OScriptNodeCallMemberFunction : public OScriptNodeCallFunction
//~ Begin OScriptNode Interface
String get_tooltip_text() const override;
String get_node_title() const override;
String get_node_title_color_name() const override { return "function_call"; }
String get_node_title_color_name() const override;
String get_help_topic() const override;
void initialize(const OScriptNodeInitContext& p_context) override;
void validate_node_during_build(BuildLog& p_log) const override;
Expand Down
2 changes: 1 addition & 1 deletion src/script/nodes/functions/call_script_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class OScriptNodeCallScriptFunction : public OScriptNodeCallFunction
void post_placed_new_node() override;
String get_tooltip_text() const override;
String get_node_title() const override;
String get_node_title_color_name() const override { return "function_call"; }
String get_node_title_color_name() const override { return "orchestration_function_call"; }
Object* get_jump_target_for_double_click() const override;
bool can_jump_to_definition() const override;
void validate_node_during_build(BuildLog& p_log) const override;
Expand Down
Loading