You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Merge pull request #98680 from jaydensipe/expose-toast-notification-methods
Expose `get_editor_toaster` method to `EditorInterface`
This commit is contained in:
@@ -506,6 +506,14 @@ void EditorToaster::instant_close(Control *p_control) {
|
||||
p_control->set_modulate(Color(1, 1, 1, 0));
|
||||
}
|
||||
|
||||
void EditorToaster::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("push_toast", "message", "severity", "tooltip"), &EditorToaster::_popup_str, DEFVAL(EditorToaster::SEVERITY_INFO), DEFVAL(String()));
|
||||
|
||||
BIND_ENUM_CONSTANT(SEVERITY_INFO);
|
||||
BIND_ENUM_CONSTANT(SEVERITY_WARNING);
|
||||
BIND_ENUM_CONSTANT(SEVERITY_ERROR);
|
||||
}
|
||||
|
||||
EditorToaster *EditorToaster::get_singleton() {
|
||||
return singleton;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ private:
|
||||
void _toast_theme_changed(Control *p_control);
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
static EditorToaster *singleton;
|
||||
|
||||
void _notification(int p_what);
|
||||
|
||||
Reference in New Issue
Block a user