summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/TextParagraph.xml2
-rw-r--r--doc/classes/XRInterfaceExtension.xml5
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp10
-rw-r--r--misc/dist/html/editor.html42
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--scene/gui/text_edit.cpp2
-rw-r--r--scene/resources/text_paragraph.cpp4
-rw-r--r--scene/resources/text_paragraph.h2
-rw-r--r--servers/xr/xr_interface_extension.cpp2
9 files changed, 46 insertions, 25 deletions
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index e06dfee698..5bd6b0572c 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -199,7 +199,7 @@
Returns width (for horizontal layout) or height (for vertical) of the line of text.
</description>
</method>
- <method name="get_non_wraped_size" qualifiers="const">
+ <method name="get_non_wrapped_size" qualifiers="const">
<return type="Vector2" />
<description>
Returns the size of the bounding box of the paragraph, without line breaks.
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
index 3b5d8e2f10..d2bb6aa59a 100644
--- a/doc/classes/XRInterfaceExtension.xml
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -81,11 +81,6 @@
<description>
</description>
</method>
- <method name="_get_tracking_status" qualifiers="virtual const">
- <return type="int" />
- <description>
- </description>
- </method>
<method name="_get_transform_for_view" qualifiers="virtual">
<return type="Transform3D" />
<argument index="0" name="view" type="int" />
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 32a8bbf406..0096152cfe 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2228,18 +2228,28 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_down", p_event)) {
cursor.x_rot -= Math_PI / 12.0;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_up", p_event)) {
cursor.x_rot += Math_PI / 12.0;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_right", p_event)) {
cursor.y_rot -= Math_PI / 12.0;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_left", p_event)) {
cursor.y_rot += Math_PI / 12.0;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_180", p_event)) {
cursor.y_rot += Math_PI;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/focus_origin", p_event)) {
_menu_option(VIEW_CENTER_TO_ORIGIN);
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index 2cae215951..69e267f665 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -14,7 +14,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="msapplication-starturl" content="/latest" />
<meta property="og:site_name" content="Godot Engine Web Editor" />
- <meta property="og:url" name="twitter:url" content="https://editor.godotengine.org/releases/latest/" />
+ <meta property="og:url" name="twitter:url" content="https://editor.godotengine.org/releases/latest/" />
<meta property="og:title" name="twitter:title" content="Free and open source 2D and 3D game engine" />
<meta property="og:description" name="twitter:description" content="Use the Godot Engine editor directly in your web browser, without having to install anything." />
<meta property="og:image" name="twitter:image" content="https://godotengine.org/themes/godotengine/assets/og_image.png" />
@@ -269,11 +269,6 @@
<div id="tabs">
<div id="tab-loader">
<div style="color: #e0e0e0;" id="persistence">
- <label for="videoMode" style="display: none;">Select video driver:</label><br />
- <select id="videoMode" style="display: none;">
- <option value="GLES2" selected="selected">WebGL</option>
- <option value="GLES3">WebGL 2</option>
- </select>
<br />
<img src="logo.svg" alt="Godot Engine logo" width="1024" height="414" style="width: auto; height: auto; max-width: 85%; max-height: 250px" />
<br />
@@ -283,6 +278,14 @@
<br />
<br />
<br />
+ <label for="videoMode" style="margin-right: 1rem">Video driver:</label>
+ <select id="videoMode">
+ <option value="" selected="selected">Auto</option>
+ <option value="GLES2">WebGL</option>
+ <option value="GLES3">WebGL 2</option>
+ </select>
+ <br />
+ <br />
<label for="zip-file" style="margin-right: 1rem">Preload project ZIP:</label> <input id="zip-file" type="file" name="files" style="margin-bottom: 1rem"/>
<br />
<a href="demo.zip">(Try this for example)</a>
@@ -348,7 +351,7 @@
var game = null;
var setStatusMode;
var setStatusNotice;
- var video_driver = "GLES2";
+ var video_driver = "";
function clearPersistence() {
function deleteDB(path) {
@@ -479,6 +482,15 @@
animationCallbacks.push(adjustCanvasDimensions);
adjustCanvasDimensions();
+ function replaceCanvas(from) {
+ const out = document.createElement("canvas");
+ out.id = from.id;
+ out.tabIndex = from.tabIndex;
+ from.parentNode.replaceChild(out, from);
+ lastScale = 0;
+ return out;
+ }
+
setStatusMode = function setStatusMode(mode) {
if (statusMode === mode || !initializing)
return;
@@ -534,6 +546,7 @@
'canvas': gameCanvas,
'canvasResizePolicy': 1,
'onExit': function () {
+ gameCanvas = replaceCanvas(gameCanvas);
setGameTabEnabled(false);
showTab('editor');
game = null;
@@ -548,7 +561,7 @@
const is_editor = args.filter(function(v) { return v == '--editor' || v == '-e' }).length != 0;
const is_project_manager = args.filter(function(v) { return v == '--project-manager' }).length != 0;
const is_game = !is_editor && !is_project_manager;
- if (is_project_manager) {
+ if (video_driver) {
args.push('--video-driver', video_driver);
}
if (is_game) {
@@ -561,7 +574,7 @@
showTab('game');
game.init().then(function() {
requestAnimationFrame(function() {
- game.start({'args': args}).then(function() {
+ game.start({'args': args, 'canvas': gameCanvas}).then(function() {
gameCanvas.focus();
});
});
@@ -576,7 +589,7 @@
showTab('loader');
setLoaderEnabled(true);
};
- editor.start({'args': args, 'persistentDrops': is_project_manager});
+ editor.start({'args': args, 'persistentDrops': is_project_manager, 'canvas': editorCanvas});
});
}, 0);
OnEditorExit = null;
@@ -603,6 +616,7 @@
'canvas': editorCanvas,
'canvasResizePolicy': 0,
'onExit': function() {
+ editorCanvas = replaceCanvas(editorCanvas);
if (OnEditorExit) {
OnEditorExit();
}
@@ -634,10 +648,14 @@
} catch(e) {
// File exists
}
- //selectVideoMode();
+ selectVideoMode();
showTab('editor');
setLoaderEnabled(false);
- editor.start({'args': ['--project-manager', '--video-driver', video_driver], 'persistentDrops': true}).then(function() {
+ const args = ['--project-manager'];
+ if (video_driver) {
+ args.push('--video-driver', video_driver);
+ }
+ editor.start({'args': args, 'persistentDrops': true}).then(function() {
setStatusMode('hidden');
initializing = false;
});
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 4588966d88..93d1eb5ba4 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -486,7 +486,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
remaining_characters -= cell_ch;
table->columns.write[column].min_width = MAX(table->columns[column].min_width, ceil(frame->lines[i].text_buf->get_size().x));
- table->columns.write[column].max_width = MAX(table->columns[column].max_width, ceil(frame->lines[i].text_buf->get_non_wraped_size().x));
+ table->columns.write[column].max_width = MAX(table->columns[column].max_width, ceil(frame->lines[i].text_buf->get_non_wrapped_size().x));
}
idx++;
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index f03eebd543..55c18980f9 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4039,7 +4039,7 @@ int TextEdit::get_visible_line_count() const {
}
int TextEdit::get_total_visible_line_count() const {
- /* Returns the total number of (lines + wraped - hidden). */
+ /* Returns the total number of (lines + wrapped - hidden). */
if (!_is_hiding_enabled() && get_line_wrapping_mode() == LineWrappingMode::LINE_WRAPPING_NONE) {
return text.size();
}
diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp
index b2e18e2451..fae1de94d3 100644
--- a/scene/resources/text_paragraph.cpp
+++ b/scene/resources/text_paragraph.cpp
@@ -84,7 +84,7 @@ void TextParagraph::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width"), "set_width", "get_width");
- ClassDB::bind_method(D_METHOD("get_non_wraped_size"), &TextParagraph::get_non_wraped_size);
+ ClassDB::bind_method(D_METHOD("get_non_wrapped_size"), &TextParagraph::get_non_wrapped_size);
ClassDB::bind_method(D_METHOD("get_size"), &TextParagraph::get_size);
ClassDB::bind_method(D_METHOD("get_rid"), &TextParagraph::get_rid);
@@ -417,7 +417,7 @@ float TextParagraph::get_width() const {
return width;
}
-Size2 TextParagraph::get_non_wraped_size() const {
+Size2 TextParagraph::get_non_wrapped_size() const {
const_cast<TextParagraph *>(this)->_shape_lines();
if (TS->shaped_text_get_orientation(rid) == TextServer::ORIENTATION_HORIZONTAL) {
return Size2(TS->shaped_text_get_size(rid).x, TS->shaped_text_get_size(rid).y + spacing_top + spacing_bottom);
diff --git a/scene/resources/text_paragraph.h b/scene/resources/text_paragraph.h
index 69c50559df..701c9a17cd 100644
--- a/scene/resources/text_paragraph.h
+++ b/scene/resources/text_paragraph.h
@@ -120,7 +120,7 @@ public:
void set_max_lines_visible(int p_lines);
int get_max_lines_visible() const;
- Size2 get_non_wraped_size() const;
+ Size2 get_non_wrapped_size() const;
Size2 get_size() const;
diff --git a/servers/xr/xr_interface_extension.cpp b/servers/xr/xr_interface_extension.cpp
index 341ba32245..80576ac607 100644
--- a/servers/xr/xr_interface_extension.cpp
+++ b/servers/xr/xr_interface_extension.cpp
@@ -41,8 +41,6 @@ void XRInterfaceExtension::_bind_methods() {
GDVIRTUAL_BIND(_initialize);
GDVIRTUAL_BIND(_uninitialize);
- GDVIRTUAL_BIND(_get_tracking_status);
-
GDVIRTUAL_BIND(_supports_play_area_mode, "mode");
GDVIRTUAL_BIND(_get_play_area_mode);
GDVIRTUAL_BIND(_set_play_area_mode, "mode");