Add a "Request Docs" button to code editor.
This commit is contained in:
parent
81292665d5
commit
6574c557c9
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
height="16"
|
||||
version="1.1"
|
||||
viewBox="0 0 16 16"
|
||||
id="svg6"
|
||||
sodipodi:docname="icon_issue.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata12">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs10" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2242"
|
||||
inkscape:window-height="1224"
|
||||
id="namedview8"
|
||||
showgrid="false"
|
||||
inkscape:zoom="29.5"
|
||||
inkscape:cx="0.93716338"
|
||||
inkscape:cy="15.746557"
|
||||
inkscape:window-x="134"
|
||||
inkscape:window-y="55"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg6" />
|
||||
<g
|
||||
transform="translate(0 -1036.4)"
|
||||
id="g4" />
|
||||
<g
|
||||
aria-label="!"
|
||||
transform="matrix(1.2172834,0,0,0.60107067,0.478728,1.8392137)"
|
||||
style="font-style:normal;font-weight:normal;font-size:19.68510056px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:0.92273909"
|
||||
id="text3719">
|
||||
<path
|
||||
d="M 5.2902433,14.98657 H 7.241452 v 2.441414 H 5.2902433 Z m 0,-11.909101 H 7.241452 V 9.3732409 L 7.0492147,12.804677 H 5.4920925 L 5.2902433,9.3732409 Z"
|
||||
style="fill:#e0e0e0;fill-opacity:1;stroke-width:0.92273909"
|
||||
id="path10"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#e0e0e0;fill-opacity:1;stroke-width:0.88671917"
|
||||
d="M 8.0503291,1.1522775 A 6.8983747,6.8983747 0 0 0 1.1522775,8.0503291 6.8983747,6.8983747 0 0 0 8.0503291,14.950113 6.8983747,6.8983747 0 0 0 14.950113,8.0503291 6.8983747,6.8983747 0 0 0 8.0503291,1.1522775 Z M 8.0208873,2.2953139 A 5.6659852,5.6659852 0 0 1 13.687577,7.9602717 5.6659852,5.6659852 0 0 1 8.0208873,13.626961 5.6659852,5.6659852 0 0 1 2.3541977,7.9602717 5.6659852,5.6659852 0 0 1 8.0208873,2.2953139 Z"
|
||||
id="path4526"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
|
@ -979,6 +979,10 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||
|
||||
OS::get_singleton()->shell_open("https://docs.godotengine.org/");
|
||||
} break;
|
||||
case REQUEST_DOCS: {
|
||||
|
||||
OS::get_singleton()->shell_open("https://github.com/godotengine/godot-docs/issues/new");
|
||||
} break;
|
||||
|
||||
case WINDOW_NEXT: {
|
||||
|
||||
|
@ -1308,6 +1312,7 @@ void ScriptEditor::_notification(int p_what) {
|
|||
EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
|
||||
help_search->set_icon(get_icon("HelpSearch", "EditorIcons"));
|
||||
site_search->set_icon(get_icon("Instance", "EditorIcons"));
|
||||
request_docs->set_icon(get_icon("Issue", "EditorIcons"));
|
||||
|
||||
script_forward->set_icon(get_icon("Forward", "EditorIcons"));
|
||||
script_back->set_icon(get_icon("Back", "EditorIcons"));
|
||||
|
@ -3081,6 +3086,12 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||
menu_hb->add_child(site_search);
|
||||
site_search->set_tooltip(TTR("Open Godot online documentation"));
|
||||
|
||||
request_docs = memnew(ToolButton);
|
||||
request_docs->set_text(TTR("Request Docs"));
|
||||
request_docs->connect("pressed", this, "_menu_option", varray(REQUEST_DOCS));
|
||||
menu_hb->add_child(request_docs);
|
||||
request_docs->set_tooltip(TTR("Help improve the Godot documentation by giving feedback"));
|
||||
|
||||
help_search = memnew(ToolButton);
|
||||
help_search->set_text(TTR("Search Help"));
|
||||
help_search->connect("pressed", this, "_menu_option", varray(SEARCH_HELP));
|
||||
|
|
|
@ -157,6 +157,7 @@ class ScriptEditor : public PanelContainer {
|
|||
DEBUG_WITH_EXTERNAL_EDITOR,
|
||||
SEARCH_HELP,
|
||||
SEARCH_WEBSITE,
|
||||
REQUEST_DOCS,
|
||||
HELP_SEARCH_FIND,
|
||||
HELP_SEARCH_FIND_NEXT,
|
||||
WINDOW_MOVE_UP,
|
||||
|
@ -200,6 +201,7 @@ class ScriptEditor : public PanelContainer {
|
|||
|
||||
Button *help_search;
|
||||
Button *site_search;
|
||||
Button *request_docs;
|
||||
EditorHelpSearch *help_search_dialog;
|
||||
|
||||
ItemList *script_list;
|
||||
|
|
Loading…
Reference in New Issue