Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide the dialog_text property from FileDialog #81546

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scene/gui/file_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions scene/gui/file_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class FileDialog : public ConfirmationDialog {
virtual void _post_popup() override;

protected:
void _validate_property(PropertyInfo &p_property) const;
void _notification(int p_what);
static void _bind_methods();

Expand Down