From 09b951b99b1a8e799b00adaa896c788949c18017 Mon Sep 17 00:00:00 2001 From: reduz Date: Wed, 23 Mar 2022 21:08:54 +0100 Subject: Refactor Object metadata * API kept the same (Although functions could be renamed to set_metadata/get_metadata in a later PR), so not much should change. * Metadata now exposed as individual properties. * Properties are editable in inspector (unless metadata name begins with _) under the metadata/ namespace. * Added the ability to Add/Remove metadata properties to the inspector. This is a functionality that was requested very often, that makes metadata work a bit more similar to custom properties in Blender. --- scene/gui/dialogs.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scene/gui/dialogs.cpp') diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index e3744eedca..be57ca9084 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -93,6 +93,9 @@ void AcceptDialog::_notification(int p_what) { } void AcceptDialog::_text_submitted(const String &p_text) { + if (get_ok_button() && get_ok_button()->is_disabled()) { + return; // Do not allow submission if OK button is disabled. + } _ok_pressed(); } -- cgit v1.2.3