|
@@ -375,7 +375,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
|
|
if (p_time > 0.0) {
|
|
if (p_time > 0.0) {
|
|
Button *close_button = memnew(Button);
|
|
Button *close_button = memnew(Button);
|
|
close_button->set_flat(true);
|
|
close_button->set_flat(true);
|
|
- close_button->connect(SceneStringName(pressed), callable_mp(this, &EditorToaster::close).bind(panel));
|
|
|
|
|
|
+ close_button->connect(SceneStringName(pressed), callable_mp(this, &EditorToaster::instant_close).bind(panel));
|
|
hbox_container->add_child(close_button);
|
|
hbox_container->add_child(close_button);
|
|
|
|
|
|
toast.close_button = close_button;
|
|
toast.close_button = close_button;
|
|
@@ -501,6 +501,11 @@ void EditorToaster::close(Control *p_control) {
|
|
toasts[p_control].popped = false;
|
|
toasts[p_control].popped = false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void EditorToaster::instant_close(Control *p_control) {
|
|
|
|
+ close(p_control);
|
|
|
|
+ p_control->set_modulate(Color(1, 1, 1, 0));
|
|
|
|
+}
|
|
|
|
+
|
|
EditorToaster *EditorToaster::get_singleton() {
|
|
EditorToaster *EditorToaster::get_singleton() {
|
|
return singleton;
|
|
return singleton;
|
|
}
|
|
}
|