Hide the dialog_text property from FileDialog
It's useless in `FileDialog`, because dialogs can have either a text label or a custom layout, and `FileDialog` already has a custom layout.
This commit is contained in:
@ -91,6 +91,13 @@ VBoxContainer *FileDialog::get_vbox() {
|
|||||||
return 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) {
|
void FileDialog::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_VISIBILITY_CHANGED: {
|
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||||
|
|||||||
@ -166,6 +166,7 @@ private:
|
|||||||
virtual void _post_popup() override;
|
virtual void _post_popup() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void _validate_property(PropertyInfo &p_property) const;
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user