EditorToaster

继承: HBoxContainer < BoxContainer < Container < Control < CanvasItem < Node < Object

管理编辑器中的 Toast 消息框通知。

描述

This object manages the functionality and display of toast notifications within the editor, ensuring immediate and informative alerts are presented to the user.

Note: This class shouldn't be instantiated directly. Instead, access the singleton using EditorInterface.get_editor_toaster().

方法

void

push_toast(message: String, severity: Severity = 0, tooltip: String = "")


枚举

enum Severity: 🔗

Severity SEVERITY_INFO = 0

显示 Toast 时使用 INFO 严重度。

Severity SEVERITY_WARNING = 1

显示 Toast 时使用 WARNING 严重度,有与之对应的颜色。

Severity SEVERITY_ERROR = 2

显示 Toast 时使用 ERROR 严重度,有与之对应的颜色。


方法说明

void push_toast(message: String, severity: Severity = 0, tooltip: String = "") 🔗

将需要显示的 Toast 通知推送给编辑器。