Update all get_configuration_warning to retrieve warnings from the parent
This commit is contained in:
parent
00949f0c5f
commit
9fc2b0fddc
40 changed files with 284 additions and 114 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue