Merge pull request #81546 from YuriSizov/there-isnt-enough-room-for-two-ways-to-customize-a-dialog-in-this-town-boy

Hide the `dialog_text` property from `FileDialog`
This commit is contained in:
Rémi Verschelde 2023-09-12 08:51:09 +02:00
commit 6a007c7512
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 8 additions and 0 deletions

View File

@ -91,6 +91,13 @@ VBoxContainer *FileDialog::get_vbox() {
return vbox;
}
void FileDialog::_validate_property(PropertyInfo &p_property) const {
if (p_property.name == "dialog_text") {
// File dialogs have a custom layout, and dialog nodes can't have both a text and a layout.
p_property.usage = PROPERTY_USAGE_NONE;
}
}
void FileDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {

View File

@ -166,6 +166,7 @@ private:
virtual void _post_popup() override;
protected:
void _validate_property(PropertyInfo &p_property) const;
void _notification(int p_what);
static void _bind_methods();