1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Merge pull request #49123 from aaronfranke/it-is-time

Add a Time singleton
This commit is contained in:
Rémi Verschelde
2021-06-12 22:55:25 +02:00
committed by GitHub
23 changed files with 1012 additions and 388 deletions

View File

@@ -43,6 +43,7 @@
#include "core/object/message_queue.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/os/time.h"
#include "core/string/print_string.h"
#include "core/string/translation.h"
#include "core/version.h"
@@ -2823,7 +2824,7 @@ void EditorNode::_request_screenshot() {
}
void EditorNode::_screenshot(bool p_use_utc) {
String name = "editor_screenshot_" + OS::get_singleton()->get_iso_date_time(p_use_utc).replace(":", "") + ".png";
String name = "editor_screenshot_" + Time::get_singleton()->get_datetime_string_from_system(p_use_utc).replace(":", "") + ".png";
NodePath path = String("user://") + name;
_save_screenshot(path);
if (EditorSettings::get_singleton()->get("interface/editor/automatically_open_screenshots")) {