From 299585fcdecdfe25fa7f58cc9f5b9db6713791db Mon Sep 17 00:00:00 2001 From: Hendrik Brucker Date: Wed, 14 Sep 2022 18:09:21 +0200 Subject: [PATCH] Add configuration warning to GraphEdit regarding future refactoring --- scene/gui/graph_edit.cpp | 8 ++++++++ scene/gui/graph_edit.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 69512903b4a..5a0236268b5 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -190,6 +190,14 @@ void GraphEditMinimap::_adjust_graph_scroll(const Vector2 &p_offset) { ge->set_scroll_ofs(p_offset + graph_offset - camera_size / 2); } +TypedArray GraphEdit::get_configuration_warnings() const { + TypedArray warnings = Control::get_configuration_warnings(); + + warnings.push_back(RTR("Please be aware that GraphEdit and GraphNode will undergo extensive refactoring in a future beta version involving compatibility-breaking API changes.")); + + return warnings; +} + Error GraphEdit::connect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port) { if (is_node_connected(p_from, p_from_port, p_to, p_to_port)) { return OK; diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index 9371ed3df46..0fe9e7c5550 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -287,6 +287,8 @@ protected: GDVIRTUAL4R(bool, _is_node_hover_valid, StringName, int, StringName, int); public: + TypedArray get_configuration_warnings() const override; + Error connect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port); bool is_node_connected(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port); void disconnect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port);