summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
authorJayden Sipe <jayden.sipe@gmail.com>2024-10-30 15:33:40 -0400
committerJayden Sipe <jayden.sipe@gmail.com>2024-11-11 19:39:33 -0500
commit722d9324661760ccc7528716b42badafeda09171 (patch)
treec9a3a8ea252b55e9c8cfc6cb745f10fe72e8e741 /doc/classes
parentec6a1c0e792ac8be44990749800a4654a293b9ee (diff)
downloadredot-engine-722d9324661760ccc7528716b42badafeda09171.tar.gz
Expose toast notification methods
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/EditorInterface.xml6
-rw-r--r--doc/classes/EditorToaster.xml34
2 files changed, 40 insertions, 0 deletions
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 0304499a61..624e828520 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -117,6 +117,12 @@
[b]Note:[/b] When creating custom editor UI, prefer accessing theme items directly from your GUI nodes using the [code]get_theme_*[/code] methods.
</description>
</method>
+ <method name="get_editor_toaster" qualifiers="const">
+ <return type="EditorToaster" />
+ <description>
+ Returns the editor's [EditorToaster].
+ </description>
+ </method>
<method name="get_editor_undo_redo" qualifiers="const">
<return type="EditorUndoRedoManager" />
<description>
diff --git a/doc/classes/EditorToaster.xml b/doc/classes/EditorToaster.xml
new file mode 100644
index 0000000000..c30b94c989
--- /dev/null
+++ b/doc/classes/EditorToaster.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorToaster" inherits="HBoxContainer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Manages toast notifications within the editor.
+ </brief_description>
+ <description>
+ This object manages the functionality and display of toast notifications within the editor, ensuring timely and informative alerts are presented to users.
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_editor_toaster].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="push_toast">
+ <return type="void" />
+ <param index="0" name="message" type="String" />
+ <param index="1" name="severity" type="int" enum="EditorToaster.Severity" default="0" />
+ <param index="2" name="tooltip" type="String" default="&quot;&quot;" />
+ <description>
+ Pushes a toast notification to the editor for display.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="SEVERITY_INFO" value="0" enum="Severity">
+ Toast will display with an INFO severity.
+ </constant>
+ <constant name="SEVERITY_WARNING" value="1" enum="Severity">
+ Toast will display with a WARNING severity and have a corresponding color.
+ </constant>
+ <constant name="SEVERITY_ERROR" value="2" enum="Severity">
+ Toast will display with an ERROR severity and have a corresponding color.
+ </constant>
+ </constants>
+</class>