You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Update all get_configuration_warning to retrieve warnings from the parent
This commit is contained in:
@@ -520,6 +520,8 @@ void ScrollContainer::set_follow_focus(bool p_follow) {
|
||||
}
|
||||
|
||||
String ScrollContainer::get_configuration_warning() const {
|
||||
String warning = Container::get_configuration_warning();
|
||||
|
||||
int found = 0;
|
||||
|
||||
for (int i = 0; i < get_child_count(); i++) {
|
||||
@@ -538,10 +540,12 @@ String ScrollContainer::get_configuration_warning() const {
|
||||
}
|
||||
|
||||
if (found != 1) {
|
||||
return TTR("ScrollContainer is intended to work with a single child control.\nUse a container as child (VBox, HBox, etc.), or a Control and set the custom minimum size manually.");
|
||||
} else {
|
||||
return "";
|
||||
if (!warning.empty()) {
|
||||
warning += "\n\n";
|
||||
}
|
||||
warning += TTR("ScrollContainer is intended to work with a single child control.\nUse a container as child (VBox, HBox, etc.), or a Control and set the custom minimum size manually.");
|
||||
}
|
||||
return warning;
|
||||
}
|
||||
|
||||
HScrollBar *ScrollContainer::get_h_scrollbar() {
|
||||
|
||||
Reference in New Issue
Block a user