From 92e6c2a33d36439c971eacb7b21b038f44dc9742 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 17 Feb 2022 18:16:11 +0100 Subject: [PATCH] Use versioned URL for "Online Documentation" buttons in the editor This also avoids a redirect, making the page appear to load faster. (cherry picked from commit 958912a33f18650b7d06fa5157d61e3a528281d3) --- editor/editor_node.cpp | 2 +- editor/plugins/script_editor_plugin.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 7d43fc51258..d5486234322 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2863,7 +2863,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { emit_signal("request_help_search", ""); } break; case HELP_DOCS: { - OS::get_singleton()->shell_open("https://docs.godotengine.org/"); + OS::get_singleton()->shell_open(VERSION_DOCS_URL "/"); } break; case HELP_QA: { OS::get_singleton()->shell_open("https://godotengine.org/qa/"); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 0a0b7b90801..664028894bc 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -36,6 +36,7 @@ #include "core/os/keyboard.h" #include "core/os/os.h" #include "core/project_settings.h" +#include "core/version.h" #include "editor/editor_node.h" #include "editor/editor_run_script.h" #include "editor/editor_scale.h" @@ -1067,7 +1068,7 @@ void ScriptEditor::_menu_option(int p_option) { help_search_dialog->popup_dialog(); } break; case SEARCH_WEBSITE: { - OS::get_singleton()->shell_open("https://docs.godotengine.org/"); + OS::get_singleton()->shell_open(VERSION_DOCS_URL "/"); } break; case WINDOW_NEXT: { _history_forward();