summaryrefslogtreecommitdiffstats
path: root/scene/gui
diff options
context:
space:
mode:
authorRedMser <redmser.jj2@gmail.com>2023-07-05 15:41:44 +0200
committerRedMser <redmser.jj2@gmail.com>2024-02-08 23:05:20 +0100
commitd3852deaa450d77edb30df2bb1c77bd7bc45befc (patch)
treee25fb2b4795f3ffec816349a7080ef95f3406a24 /scene/gui
parentbf37a9bac6ebfb09c0a374260c35ede8373ce427 (diff)
downloadredot-engine-d3852deaa450d77edb30df2bb1c77bd7bc45befc.tar.gz
Update Node::get_configuration_warnings signature
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/base_button.cpp4
-rw-r--r--scene/gui/base_button.h2
-rw-r--r--scene/gui/container.cpp4
-rw-r--r--scene/gui/container.h2
-rw-r--r--scene/gui/control.cpp6
-rw-r--r--scene/gui/control.h2
-rw-r--r--scene/gui/graph_edit.cpp4
-rw-r--r--scene/gui/graph_edit.h2
-rw-r--r--scene/gui/label.cpp4
-rw-r--r--scene/gui/label.h2
-rw-r--r--scene/gui/line_edit.cpp4
-rw-r--r--scene/gui/line_edit.h2
-rw-r--r--scene/gui/range.cpp4
-rw-r--r--scene/gui/range.h2
-rw-r--r--scene/gui/scroll_container.cpp4
-rw-r--r--scene/gui/scroll_container.h2
-rw-r--r--scene/gui/subviewport_container.cpp4
-rw-r--r--scene/gui/subviewport_container.h2
18 files changed, 28 insertions, 28 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 66b14dc967..49616f87cc 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -430,8 +430,8 @@ bool BaseButton::_was_pressed_by_mouse() const {
return was_mouse_pressed;
}
-PackedStringArray BaseButton::get_configuration_warnings() const {
- PackedStringArray warnings = Control::get_configuration_warnings();
+Array BaseButton::get_configuration_warnings() const {
+ Array warnings = Control::get_configuration_warnings();
if (get_button_group().is_valid() && !is_toggle_mode()) {
warnings.push_back(RTR("ButtonGroup is intended to be used only with buttons that have toggle_mode set to true."));
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index a8d5cee44c..b5fbf11c8d 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -139,7 +139,7 @@ public:
void set_button_group(const Ref<ButtonGroup> &p_group);
Ref<ButtonGroup> get_button_group() const;
- PackedStringArray get_configuration_warnings() const override;
+ Array get_configuration_warnings() const override;
BaseButton();
~BaseButton();
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index c6e66c95c6..594ae3eee8 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -189,8 +189,8 @@ void Container::_notification(int p_what) {
}
}
-PackedStringArray Container::get_configuration_warnings() const {
- PackedStringArray warnings = Control::get_configuration_warnings();
+Array Container::get_configuration_warnings() const {
+ Array warnings = Control::get_configuration_warnings();
if (get_class() == "Container" && get_script().is_null()) {
warnings.push_back(RTR("Container by itself serves no purpose unless a script configures its children placement behavior.\nIf you don't intend to add a script, use a plain Control node instead."));
diff --git a/scene/gui/container.h b/scene/gui/container.h
index 94c3c540d7..d04a71fe23 100644
--- a/scene/gui/container.h
+++ b/scene/gui/container.h
@@ -63,7 +63,7 @@ public:
virtual Vector<int> get_allowed_size_flags_horizontal() const;
virtual Vector<int> get_allowed_size_flags_vertical() const;
- PackedStringArray get_configuration_warnings() const override;
+ Array get_configuration_warnings() const override;
Container();
};
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index fcdbdb4edb..7bbc0a5ec5 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -228,9 +228,9 @@ void Control::get_argument_options(const StringName &p_function, int p_idx, List
}
}
-PackedStringArray Control::get_configuration_warnings() const {
- ERR_READ_THREAD_GUARD_V(PackedStringArray());
- PackedStringArray warnings = Node::get_configuration_warnings();
+Array Control::get_configuration_warnings() const {
+ ERR_READ_THREAD_GUARD_V(Array());
+ Array warnings = Node::get_configuration_warnings();
if (data.mouse_filter == MOUSE_FILTER_IGNORE && !data.tooltip.is_empty()) {
warnings.push_back(RTR("The Hint Tooltip won't be displayed as the control's Mouse Filter is set to \"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."));
diff --git a/scene/gui/control.h b/scene/gui/control.h
index aec61dc2fe..e0bd624edf 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -408,7 +408,7 @@ public:
static void set_root_layout_direction(int p_root_dir);
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
- PackedStringArray get_configuration_warnings() const override;
+ Array get_configuration_warnings() const override;
virtual bool is_text_field() const;
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index c23d21775f..7ea3aa344a 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -251,8 +251,8 @@ Control::CursorShape GraphEdit::get_cursor_shape(const Point2 &p_pos) const {
return Control::get_cursor_shape(p_pos);
}
-PackedStringArray GraphEdit::get_configuration_warnings() const {
- PackedStringArray warnings = Control::get_configuration_warnings();
+Array GraphEdit::get_configuration_warnings() const {
+ Array warnings = Control::get_configuration_warnings();
warnings.push_back(RTR("Please be aware that GraphEdit and GraphNode will undergo extensive refactoring in a future 4.x version involving compatibility-breaking API changes."));
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index e24f039e84..dd99651d60 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -375,7 +375,7 @@ public:
virtual CursorShape get_cursor_shape(const Point2 &p_pos = Point2i()) const override;
- PackedStringArray get_configuration_warnings() const override;
+ Array 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);
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 56da1332e7..f847971015 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -330,8 +330,8 @@ inline void draw_glyph_outline(const Glyph &p_gl, const RID &p_canvas, const Col
}
}
-PackedStringArray Label::get_configuration_warnings() const {
- PackedStringArray warnings = Control::get_configuration_warnings();
+Array Label::get_configuration_warnings() const {
+ Array warnings = Control::get_configuration_warnings();
// FIXME: This is not ideal and the sizing model should be fixed,
// but for now we have to warn about this impossible to resolve combination.
diff --git a/scene/gui/label.h b/scene/gui/label.h
index 4bd0e53605..fe90bd06bb 100644
--- a/scene/gui/label.h
+++ b/scene/gui/label.h
@@ -97,7 +97,7 @@ protected:
public:
virtual Size2 get_minimum_size() const override;
- virtual PackedStringArray get_configuration_warnings() const override;
+ virtual Array get_configuration_warnings() const override;
void set_horizontal_alignment(HorizontalAlignment p_alignment);
HorizontalAlignment get_horizontal_alignment() const;
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index a6109a3925..beafe7ec7a 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -2278,8 +2278,8 @@ void LineEdit::_emit_text_change() {
emit_signal(SNAME("text_changed"), text);
text_changed_dirty = false;
}
-PackedStringArray LineEdit::get_configuration_warnings() const {
- PackedStringArray warnings = Control::get_configuration_warnings();
+Array LineEdit::get_configuration_warnings() const {
+ Array warnings = Control::get_configuration_warnings();
if (secret_character.length() > 1) {
warnings.push_back("Secret Character property supports only one character. Extra characters will be ignored.");
}
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 993bc727e4..b2582e0eb5 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -385,7 +385,7 @@ public:
virtual bool is_text_field() const override;
- PackedStringArray get_configuration_warnings() const override;
+ Array get_configuration_warnings() const override;
void show_virtual_keyboard();
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index 236dfcc864..da40c7f3e2 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -30,8 +30,8 @@
#include "range.h"
-PackedStringArray Range::get_configuration_warnings() const {
- PackedStringArray warnings = Node::get_configuration_warnings();
+Array Range::get_configuration_warnings() const {
+ Array warnings = Node::get_configuration_warnings();
if (shared->exp_ratio && shared->min <= 0) {
warnings.push_back(RTR("If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."));
diff --git a/scene/gui/range.h b/scene/gui/range.h
index b1c2446ded..e08a77f0f7 100644
--- a/scene/gui/range.h
+++ b/scene/gui/range.h
@@ -103,7 +103,7 @@ public:
void share(Range *p_range);
void unshare();
- PackedStringArray get_configuration_warnings() const override;
+ Array get_configuration_warnings() const override;
Range();
~Range();
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 89d308de3f..fd3a1f4a45 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -537,8 +537,8 @@ void ScrollContainer::set_follow_focus(bool p_follow) {
follow_focus = p_follow;
}
-PackedStringArray ScrollContainer::get_configuration_warnings() const {
- PackedStringArray warnings = Container::get_configuration_warnings();
+Array ScrollContainer::get_configuration_warnings() const {
+ Array warnings = Container::get_configuration_warnings();
int found = 0;
diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h
index 02146618cd..69ff7ccc14 100644
--- a/scene/gui/scroll_container.h
+++ b/scene/gui/scroll_container.h
@@ -119,7 +119,7 @@ public:
VScrollBar *get_v_scroll_bar();
void ensure_control_visible(Control *p_control);
- PackedStringArray get_configuration_warnings() const override;
+ Array get_configuration_warnings() const override;
ScrollContainer();
};
diff --git a/scene/gui/subviewport_container.cpp b/scene/gui/subviewport_container.cpp
index 0d33774e20..4ed136005a 100644
--- a/scene/gui/subviewport_container.cpp
+++ b/scene/gui/subviewport_container.cpp
@@ -259,8 +259,8 @@ void SubViewportContainer::remove_child_notify(Node *p_child) {
}
}
-PackedStringArray SubViewportContainer::get_configuration_warnings() const {
- PackedStringArray warnings = Node::get_configuration_warnings();
+Array SubViewportContainer::get_configuration_warnings() const {
+ Array warnings = Node::get_configuration_warnings();
bool has_viewport = false;
for (int i = 0; i < get_child_count(); i++) {
diff --git a/scene/gui/subviewport_container.h b/scene/gui/subviewport_container.h
index 06420de730..e172f2f040 100644
--- a/scene/gui/subviewport_container.h
+++ b/scene/gui/subviewport_container.h
@@ -68,7 +68,7 @@ public:
virtual Vector<int> get_allowed_size_flags_horizontal() const override;
virtual Vector<int> get_allowed_size_flags_vertical() const override;
- PackedStringArray get_configuration_warnings() const override;
+ Array get_configuration_warnings() const override;
SubViewportContainer();
};