diff options
| author | Juan Linietsky | 2016-05-17 18:27:15 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-05-17 18:28:44 -0300 |
| commit | c195c0df6b36debc870216dd42e49fbda70fa861 (patch) | |
| tree | 194a26e39ace86d7a471f3e86159c2aed6be261c /scene/gui/popup.cpp | |
| parent | 3a26e14a2bab777c9ba6aedceff6e4ef2666faf0 (diff) | |
| download | godot-c195c0d.tar.gz godot-c195c0d.tar.zst godot-c195c0d.zip | |
-Added configuration warning system for nodes
-Added a new "add" and "instance" buttons for scene tree
-Added a vformat() function to ease translation work
Diffstat (limited to 'scene/gui/popup.cpp')
| -rw-r--r-- | scene/gui/popup.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 0d9a76937..8d02d0e4e 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -44,6 +44,8 @@ void Popup::_notification(int p_what) { notification(NOTIFICATION_POPUP_HIDE); emit_signal("popup_hide"); } + + update_configuration_warning(); } if (p_what==NOTIFICATION_ENTER_TREE) { @@ -282,6 +284,14 @@ Popup::Popup() { hide(); } +String Popup::get_configuration_warning() const { + + if (is_visible()) { + return TTR("Popups will hide by default unless you call popup() or any of the popup*() functions. Making them visible for editing is fine though, but they will hide upon running."); + } + + return String(); +} Popup::~Popup() { |
