MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _get_version_string

Function _get_version_string

editor/gui/editor_version_button.cpp:44–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42#include "core/version.h"
43
44String _get_version_string(EditorVersionButton::VersionFormat p_format) {
45 String main;
46 switch (p_format) {
47 case EditorVersionButton::FORMAT_BASIC: {
48 return REDOT_VERSION_FULL_CONFIG;
49 } break;
50 case EditorVersionButton::FORMAT_WITH_BUILD: {
51 main = "v" REDOT_VERSION_FULL_BUILD;
52 } break;
53 case EditorVersionButton::FORMAT_WITH_NAME_AND_BUILD: {
54 main = REDOT_VERSION_FULL_NAME;
55 } break;
56 default: {
57 ERR_FAIL_V_MSG(REDOT_VERSION_FULL_NAME, "Unexpected format: " + itos(p_format));
58 } break;
59 }
60
61 String hash = REDOT_VERSION_HASH;
62 if (!hash.is_empty()) {
63 hash = vformat(" [%s]", hash.left(9));
64 }
65 return main + hash;
66}
67
68void EditorVersionButton::_notification(int p_what) {
69 switch (p_what) {

Callers 2

_notificationMethod · 0.85
pressedMethod · 0.85

Calls 4

itosFunction · 0.85
vformatFunction · 0.85
leftMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected