Skip to content
0.2.0-dev Download ZIP
34 lines ·1.5 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="EditorToaster" inherits="HBoxContainer" api_type="editor" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Manages toast notifications within the editor.
5 </brief_description>
6 <description>
7 This object manages the functionality and display of toast notifications within the editor, ensuring immediate and informative alerts are presented to the user.
8 [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_editor_toaster].
9 </description>
10 <tutorials>
11 </tutorials>
12 <methods>
13 <method name="push_toast">
14 <return type="void" />
15 <param index="0" name="message" type="String" />
16 <param index="1" name="severity" type="int" enum="EditorToaster.Severity" default="0" />
17 <param index="2" name="tooltip" type="String" default="&quot;&quot;" />
18 <description>
19 Pushes a toast notification to the editor for display.
20 </description>
21 </method>
22 </methods>
23 <constants>
24 <constant name="SEVERITY_INFO" value="0" enum="Severity">
25 Toast will display with an INFO severity.
26 </constant>
27 <constant name="SEVERITY_WARNING" value="1" enum="Severity">
28 Toast will display with a WARNING severity and have a corresponding color.
29 </constant>
30 <constant name="SEVERITY_ERROR" value="2" enum="Severity">
31 Toast will display with an ERROR severity and have a corresponding color.
32 </constant>
33 </constants>
34</class>