Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Show toast when copying version

kobewia9cf92ad3c96
diff --git a/editor/gui/editor_version_button.cpp b/editor/gui/editor_version_button.cpp
index b0a2db53551..1e72106ebb4 100644
--- a/editor/gui/editor_version_button.cpp
+++ b/editor/gui/editor_version_button.cpp
@@ -32,6 +32,7 @@
#include "core/os/time.h"
#include "core/version.h"
+#include "editor/gui/editor_toaster.h"
#include "servers/display/display_server.h"
String _get_version_string(EditorVersionButton::VersionFormat p_format) {
@@ -80,6 +81,10 @@ void EditorVersionButton::_notification(int p_what) {
void EditorVersionButton::pressed() {
DisplayServer::get_singleton()->clipboard_set(_get_version_string(FORMAT_WITH_BUILD));
+ EditorToaster *toaster = EditorToaster::get_singleton();
+ if (toaster) {
+ toaster->popup_str(TTR("Copied Godot editor version."));
+ }
}
EditorVersionButton::EditorVersionButton(VersionFormat p_format) {