diff options
-rw-r--r-- | doc/classes/OS.xml | 8 | ||||
-rw-r--r-- | editor/animation_track_editor.cpp | 74 | ||||
-rw-r--r-- | editor/editor_audio_buses.cpp | 22 | ||||
-rw-r--r-- | editor/editor_help.cpp | 40 | ||||
-rw-r--r-- | editor/editor_node.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 9 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 6 | ||||
-rw-r--r-- | modules/csg/csg_shape.cpp | 8 | ||||
-rw-r--r-- | modules/gdscript/language_server/gdscript_extend_parser.cpp | 6 | ||||
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java | 6 | ||||
-rw-r--r-- | platform/iphone/gl_view.mm | 3 | ||||
-rw-r--r-- | scene/3d/audio_stream_player_3d.cpp | 1 | ||||
-rw-r--r-- | scene/3d/baked_lightmap.cpp | 1 | ||||
-rw-r--r-- | scene/3d/gi_probe.cpp | 1 | ||||
-rw-r--r-- | scene/gui/rich_text_label.h | 93 |
15 files changed, 184 insertions, 96 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 938777a36b..9f61245819 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -820,6 +820,7 @@ </argument> <description> Sets the window title to the specified string. + [b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers. </description> </method> <method name="shell_open"> @@ -828,9 +829,10 @@ <argument index="0" name="uri" type="String"> </argument> <description> - Requests the OS to open a resource with the most appropriate program. For example. - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the downloads folders of the user. - [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. + Requests the OS to open a resource with the most appropriate program. For example: + - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. + - [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. + - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added. </description> </method> <method name="show_virtual_keyboard"> diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 285cea7d0a..fa773b17c2 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -3470,20 +3470,18 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) { if (p_id.track_idx == -1) { if (bool(EDITOR_DEF("editors/animation/confirm_insert_track", true))) { //potential new key, does not exist - if (insert_data.size() == 1) - insert_confirm_text->set_text(vformat(TTR("Create NEW track for %s and insert key?"), p_id.query)); - else - insert_confirm_text->set_text(vformat(TTR("Create %d NEW tracks and insert keys?"), insert_data.size())); - + int num_tracks = 0; bool all_bezier = true; for (int i = 0; i < insert_data.size(); i++) { - if (insert_data[i].type != Animation::TYPE_VALUE && insert_data[i].type != Animation::TYPE_BEZIER) { + if (insert_data[i].type != Animation::TYPE_VALUE && insert_data[i].type != Animation::TYPE_BEZIER) all_bezier = false; - } - if (insert_data[i].type != Animation::TYPE_VALUE) { + if (insert_data[i].track_idx == -1) + ++num_tracks; + + if (insert_data[i].type != Animation::TYPE_VALUE) continue; - } + switch (insert_data[i].value.get_type()) { case Variant::INT: case Variant::REAL: @@ -3500,6 +3498,11 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) { } } + if (num_tracks == 1) + insert_confirm_text->set_text(vformat(TTR("Create NEW track for %s and insert key?"), p_id.query)); + else + insert_confirm_text->set_text(vformat(TTR("Create %d NEW tracks and insert keys?"), num_tracks)); + insert_confirm_bezier->set_visible(all_bezier); insert_confirm->get_ok()->set_text(TTR("Create")); insert_confirm->popup_centered_minsize(); @@ -3686,16 +3689,20 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p } else if (animation->track_get_type(i) == Animation::TYPE_BEZIER) { Variant value; - if (animation->track_get_path(i) == np) { + String track_path = animation->track_get_path(i); + if (track_path == np) { value = p_value; //all good } else { - String tpath = animation->track_get_path(i); - if (NodePath(tpath.get_basename()) == np) { - String subindex = tpath.get_extension(); - value = p_value.get(subindex); - } else { + int sep = track_path.find_last(":"); + if (sep != -1) { + String base_path = track_path.substr(0, sep); + if (base_path == np) { + String value_name = track_path.substr(sep + 1); + value = p_value.get(value_name); + } else + continue; + } else continue; - } } InsertData id; @@ -3955,25 +3962,20 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo bool created = false; if (p_id.track_idx < 0) { - if (p_create_beziers && (p_id.value.get_type() == Variant::INT || - p_id.value.get_type() == Variant::REAL || - p_id.value.get_type() == Variant::VECTOR2 || - p_id.value.get_type() == Variant::VECTOR3 || - p_id.value.get_type() == Variant::QUAT || - p_id.value.get_type() == Variant::COLOR || - p_id.value.get_type() == Variant::PLANE)) { - - Vector<String> subindices = _get_bezier_subindices_for_type(p_id.value.get_type()); - - for (int i = 0; i < subindices.size(); i++) { - InsertData id = p_id; - id.type = Animation::TYPE_BEZIER; - id.value = p_id.value.get(subindices[i].substr(1, subindices[i].length())); - id.path = String(p_id.path) + subindices[i]; - _confirm_insert(id, p_last_track + i); - } + if (p_create_beziers) { + bool valid; + Vector<String> subindices = _get_bezier_subindices_for_type(p_id.value.get_type(), &valid); + if (valid) { + for (int i = 0; i < subindices.size(); i++) { + InsertData id = p_id; + id.type = Animation::TYPE_BEZIER; + id.value = p_id.value.get(subindices[i].substr(1, subindices[i].length())); + id.path = String(p_id.path) + subindices[i]; + _confirm_insert(id, p_last_track + i); + } - return p_last_track + subindices.size() - 1; + return p_last_track + subindices.size(); + } } created = true; undo_redo->create_action(TTR("Anim Insert Track & Key")); @@ -4064,7 +4066,7 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo // Just remove the track. undo_redo->add_undo_method(this, "_clear_selection", false); - undo_redo->add_undo_method(animation.ptr(), "remove_track", p_last_track); + undo_redo->add_undo_method(animation.ptr(), "remove_track", animation->get_track_count()); p_last_track++; } else { @@ -4590,7 +4592,7 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) { for (int i = 0; i < subindices.size(); i++) { undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type); undo_redo->add_do_method(animation.ptr(), "track_set_path", base_track + i, full_path + subindices[i]); - undo_redo->add_undo_method(animation.ptr(), "remove_track", base_track + i); + undo_redo->add_undo_method(animation.ptr(), "remove_track", base_track); } undo_redo->commit_action(); } diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 05b5fa7905..31095b1100 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -31,6 +31,7 @@ #include "editor_audio_buses.h" #include "core/io/resource_saver.h" +#include "core/os/input.h" #include "core/os/keyboard.h" #include "editor_node.h" #include "filesystem_dock.h" @@ -321,7 +322,13 @@ void EditorAudioBus::_volume_changed(float p_normalized) { updating_bus = true; - float p_db = this->_normalized_volume_to_scaled_db(p_normalized); + const float p_db = this->_normalized_volume_to_scaled_db(p_normalized); + + if (Input::get_singleton()->is_key_pressed(KEY_CONTROL)) { + // Snap the value when holding Ctrl for easier editing. + // To do so, it needs to be converted back to normalized volume (as the slider uses that unit). + slider->set_value(_scaled_db_to_normalized_volume(Math::round(p_db))); + } UndoRedo *ur = EditorNode::get_undo_redo(); ur->create_action(TTR("Change Audio Bus Volume"), UndoRedo::MERGE_ENDS); @@ -376,7 +383,16 @@ float EditorAudioBus::_scaled_db_to_normalized_volume(float db) { } void EditorAudioBus::_show_value(float slider_value) { - String text = vformat("%10.1f dB", _normalized_volume_to_scaled_db(slider_value)); + + float db; + if (Input::get_singleton()->is_key_pressed(KEY_CONTROL)) { + // Display the correct (snapped) value when holding Ctrl + db = Math::round(_normalized_volume_to_scaled_db(slider_value)); + } else { + db = _normalized_volume_to_scaled_db(slider_value); + } + + String text = vformat("%10.1f dB", db); slider->set_tooltip(text); audio_value_preview_label->set_text(text); @@ -384,7 +400,7 @@ void EditorAudioBus::_show_value(float slider_value) { Vector2 slider_position = slider->get_global_position(); float left_padding = 5.0f; float vert_padding = 10.0f; - Vector2 box_position = Vector2(slider_size.x + left_padding, (slider_size.y - vert_padding) * (1.0f - slider_value) - vert_padding); + Vector2 box_position = Vector2(slider_size.x + left_padding, (slider_size.y - vert_padding) * (1.0f - slider->get_value()) - vert_padding); audio_value_preview_box->set_position(slider_position + box_position); audio_value_preview_box->set_size(audio_value_preview_label->get_size()); if (slider->has_focus() && !audio_value_preview_box->is_visible()) { diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 24ed0ecfd0..04e9177d26 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -258,16 +258,17 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview } class_desc->push_color(symbol_color); - class_desc->add_text(p_method.arguments.size() || is_vararg ? "( " : "("); + class_desc->add_text("("); class_desc->pop(); for (int j = 0; j < p_method.arguments.size(); j++) { class_desc->push_color(text_color); if (j > 0) class_desc->add_text(", "); - _add_type(p_method.arguments[j].type, p_method.arguments[j].enumeration); - class_desc->add_text(" "); + _add_text(p_method.arguments[j].name); + class_desc->add_text(": "); + _add_type(p_method.arguments[j].type, p_method.arguments[j].enumeration); if (p_method.arguments[j].default_value != "") { class_desc->push_color(symbol_color); @@ -292,7 +293,7 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview } class_desc->push_color(symbol_color); - class_desc->add_text(p_method.arguments.size() || is_vararg ? " )" : ")"); + class_desc->add_text(")"); class_desc->pop(); if (p_method.qualifiers != "") { @@ -425,7 +426,7 @@ void EditorHelp::_update_doc() { class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Brief Description:")); + class_desc->add_text(TTR("Brief Description")); class_desc->pop(); class_desc->pop(); @@ -452,7 +453,7 @@ void EditorHelp::_update_doc() { section_line.push_back(Pair<String, int>(TTR("Properties"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Properties:")); + class_desc->add_text(TTR("Properties")); class_desc->pop(); class_desc->pop(); @@ -548,7 +549,7 @@ void EditorHelp::_update_doc() { section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Methods:")); + class_desc->add_text(TTR("Methods")); class_desc->pop(); class_desc->pop(); @@ -619,7 +620,7 @@ void EditorHelp::_update_doc() { section_line.push_back(Pair<String, int>(TTR("Theme Properties"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Theme Properties:")); + class_desc->add_text(TTR("Theme Properties")); class_desc->pop(); class_desc->pop(); @@ -686,7 +687,7 @@ void EditorHelp::_update_doc() { section_line.push_back(Pair<String, int>(TTR("Signals"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Signals:")); + class_desc->add_text(TTR("Signals")); class_desc->pop(); class_desc->pop(); @@ -703,15 +704,16 @@ void EditorHelp::_update_doc() { _add_text(cd.signals[i].name); class_desc->pop(); class_desc->push_color(symbol_color); - class_desc->add_text(cd.signals[i].arguments.size() ? "( " : "("); + class_desc->add_text("("); class_desc->pop(); for (int j = 0; j < cd.signals[i].arguments.size(); j++) { class_desc->push_color(text_color); if (j > 0) class_desc->add_text(", "); - _add_type(cd.signals[i].arguments[j].type); - class_desc->add_text(" "); + _add_text(cd.signals[i].arguments[j].name); + class_desc->add_text(": "); + _add_type(cd.signals[i].arguments[j].type); if (cd.signals[i].arguments[j].default_value != "") { class_desc->push_color(symbol_color); @@ -724,7 +726,7 @@ void EditorHelp::_update_doc() { } class_desc->push_color(symbol_color); - class_desc->add_text(cd.signals[i].arguments.size() ? " )" : ")"); + class_desc->add_text(")"); class_desc->pop(); class_desc->pop(); // end monofont if (cd.signals[i].description != "") { @@ -771,7 +773,7 @@ void EditorHelp::_update_doc() { section_line.push_back(Pair<String, int>(TTR("Enumerations"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Enumerations:")); + class_desc->add_text(TTR("Enumerations")); class_desc->pop(); class_desc->pop(); class_desc->push_indent(1); @@ -857,7 +859,7 @@ void EditorHelp::_update_doc() { section_line.push_back(Pair<String, int>(TTR("Constants"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Constants:")); + class_desc->add_text(TTR("Constants")); class_desc->pop(); class_desc->pop(); class_desc->push_indent(1); @@ -917,7 +919,7 @@ void EditorHelp::_update_doc() { description_line = class_desc->get_line_count() - 2; class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Class Description:")); + class_desc->add_text(TTR("Class Description")); class_desc->pop(); class_desc->pop(); @@ -939,7 +941,7 @@ void EditorHelp::_update_doc() { { class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Online Tutorials:")); + class_desc->add_text(TTR("Online Tutorials")); class_desc->pop(); class_desc->pop(); class_desc->push_indent(1); @@ -981,7 +983,7 @@ void EditorHelp::_update_doc() { section_line.push_back(Pair<String, int>(TTR("Property Descriptions"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Property Descriptions:")); + class_desc->add_text(TTR("Property Descriptions")); class_desc->pop(); class_desc->pop(); @@ -1091,7 +1093,7 @@ void EditorHelp::_update_doc() { section_line.push_back(Pair<String, int>(TTR("Method Descriptions"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Method Descriptions:")); + class_desc->add_text(TTR("Method Descriptions")); class_desc->pop(); class_desc->pop(); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index e1bbe4b923..1196a26882 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2519,7 +2519,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { bool was_visible = OS::get_singleton()->is_console_visible(); OS::get_singleton()->set_console_visible(!was_visible); - EditorSettings::get_singleton()->set_setting("interface/editor/hide_console_window", !was_visible); + EditorSettings::get_singleton()->set_setting("interface/editor/hide_console_window", was_visible); } break; case EDITOR_SCREENSHOT: { diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 6f612b5c79..625ca5e603 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1967,6 +1967,11 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { if (key_auto_insert_button->is_pressed()) { _insert_animation_keys(true, false, false, true); } + + //Make sure smart snapping lines disappear. + snap_target[0] = SNAP_TARGET_NONE; + snap_target[1] = SNAP_TARGET_NONE; + drag_type = DRAG_NONE; viewport->update(); return true; @@ -1975,6 +1980,8 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { // Cancel a drag if (b.is_valid() && b->get_button_index() == BUTTON_RIGHT && b->is_pressed()) { _restore_canvas_item_state(drag_selection, true); + snap_target[0] = SNAP_TARGET_NONE; + snap_target[1] = SNAP_TARGET_NONE; drag_type = DRAG_NONE; viewport->update(); return true; @@ -5044,6 +5051,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { snap_rotation = false; snap_relative = false; snap_pixel = false; + snap_target[0] = SNAP_TARGET_NONE; + snap_target[1] = SNAP_TARGET_NONE; anchors_mode = false; diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index edc14ccf71..d42f15cce8 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -1007,8 +1007,12 @@ void ProjectSettingsEditor::_copy_to_platform_about_to_show() { presets.insert("pvrtc"); presets.insert("debug"); presets.insert("release"); + presets.insert("editor"); + presets.insert("standalone"); presets.insert("32"); presets.insert("64"); + // Not available as an export platform yet, so it needs to be added manually + presets.insert("Server"); for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) { List<String> p; @@ -1305,7 +1309,7 @@ void ProjectSettingsEditor::_translation_res_option_changed() { ERR_FAIL_COND(!remaps.has(key)); PoolStringArray r = remaps[key]; ERR_FAIL_INDEX(idx, r.size()); - if (translation_locales_idxs_remap.size() > 0) { + if (translation_locales_idxs_remap.size() > which) { r.set(idx, path + ":" + langs[translation_locales_idxs_remap[which]]); } else { r.set(idx, path + ":" + langs[which]); diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 23725c4960..35c75e2a8a 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -1067,6 +1067,7 @@ void CSGSphere::set_radius(const float p_radius) { radius = p_radius; _make_dirty(); update_gizmo(); + _change_notify("radius"); } float CSGSphere::get_radius() const { @@ -1251,6 +1252,7 @@ void CSGBox::set_width(const float p_width) { width = p_width; _make_dirty(); update_gizmo(); + _change_notify("width"); } float CSGBox::get_width() const { @@ -1261,6 +1263,7 @@ void CSGBox::set_height(const float p_height) { height = p_height; _make_dirty(); update_gizmo(); + _change_notify("height"); } float CSGBox::get_height() const { @@ -1271,6 +1274,7 @@ void CSGBox::set_depth(const float p_depth) { depth = p_depth; _make_dirty(); update_gizmo(); + _change_notify("depth"); } float CSGBox::get_depth() const { @@ -1465,6 +1469,7 @@ void CSGCylinder::set_radius(const float p_radius) { radius = p_radius; _make_dirty(); update_gizmo(); + _change_notify("radius"); } float CSGCylinder::get_radius() const { @@ -1475,6 +1480,7 @@ void CSGCylinder::set_height(const float p_height) { height = p_height; _make_dirty(); update_gizmo(); + _change_notify("height"); } float CSGCylinder::get_height() const { @@ -1690,6 +1696,7 @@ void CSGTorus::set_inner_radius(const float p_inner_radius) { inner_radius = p_inner_radius; _make_dirty(); update_gizmo(); + _change_notify("inner_radius"); } float CSGTorus::get_inner_radius() const { @@ -1700,6 +1707,7 @@ void CSGTorus::set_outer_radius(const float p_outer_radius) { outer_radius = p_outer_radius; _make_dirty(); update_gizmo(); + _change_notify("outer_radius"); } float CSGTorus::get_outer_radius() const { diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp index 9e8727ec58..6db8cb2c88 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.cpp +++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp @@ -345,15 +345,13 @@ String ExtendGDScriptParser::marked_documentation(const String &p_bbcode) { if (block_start != -1) { code_block_indent = block_start; in_code_block = true; - line = "'''gdscript"; - line = "\n"; + line = "'''gdscript\n"; } else if (in_code_block) { line = "\t" + line.substr(code_block_indent, line.length()); } if (in_code_block && line.find("[/codeblock]") != -1) { - line = "'''\n"; - line = "\n"; + line = "'''\n\n"; in_code_block = false; } diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java index a443a0ad90..2beca67922 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java +++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java @@ -96,7 +96,6 @@ public class GodotInputHandler implements InputDeviceListener { GodotLib.joybutton(device_id, button, false); } }); - return true; } } else { final int chr = event.getUnicodeChar(0); @@ -108,7 +107,7 @@ public class GodotInputHandler implements InputDeviceListener { }); }; - return false; + return true; } public boolean onKeyDown(final int keyCode, KeyEvent event) { @@ -142,7 +141,6 @@ public class GodotInputHandler implements InputDeviceListener { GodotLib.joybutton(device_id, button, true); } }); - return true; } } else { final int chr = event.getUnicodeChar(0); @@ -154,7 +152,7 @@ public class GodotInputHandler implements InputDeviceListener { }); }; - return false; + return true; } public boolean onGenericMotionEvent(MotionEvent event) { diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm index 4641b2c4ac..dfca2e3dd7 100644 --- a/platform/iphone/gl_view.mm +++ b/platform/iphone/gl_view.mm @@ -337,12 +337,9 @@ static void clear_touches() { // the same size as our display area. - (void)layoutSubviews { - //printf("HERE\n"); [EAGLContext setCurrentContext:context]; [self destroyFramebuffer]; [self createFramebuffer]; - [self drawView]; - [self drawView]; } - (BOOL)createFramebuffer { diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index 27f16f7601..05ae281cc1 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -836,6 +836,7 @@ void AudioStreamPlayer3D::set_emission_angle(float p_angle) { ERR_FAIL_COND(p_angle < 0 || p_angle > 90); emission_angle = p_angle; update_gizmo(); + _change_notify("emission_angle"); } float AudioStreamPlayer3D::get_emission_angle() const { diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index c5ff4dadbc..b70e6dbc5d 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -215,6 +215,7 @@ float BakedLightmap::get_capture_cell_size() const { void BakedLightmap::set_extents(const Vector3 &p_extents) { extents = p_extents; update_gizmo(); + _change_notify("bake_extents"); } Vector3 BakedLightmap::get_extents() const { diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index a04f156d80..ccc87b924c 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -243,6 +243,7 @@ void GIProbe::set_extents(const Vector3 &p_extents) { extents = p_extents; update_gizmo(); + _change_notify("extents"); } Vector3 GIProbe::get_extents() const { diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 1c212700ef..481f8d9746 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -81,7 +81,7 @@ protected: static void _bind_methods(); private: - struct Item; + class Item; struct Line { @@ -103,8 +103,10 @@ private: } }; - struct Item : public Object { + class Item : public Object { + GDCLASS(Item, Object); + public: int index; Item *parent; ItemType type; @@ -127,8 +129,10 @@ private: virtual ~Item() { _clear_children(); } }; - struct ItemFrame : public Item { + class ItemFrame : public Item { + GDCLASS(ItemFrame, Item); + public: int parent_line; bool cell; Vector<Line> lines; @@ -143,71 +147,95 @@ private: } }; - struct ItemText : public Item { + class ItemText : public Item { + GDCLASS(ItemText, Item); + public: String text; ItemText() { type = ITEM_TEXT; } }; - struct ItemImage : public Item { + class ItemImage : public Item { + GDCLASS(ItemImage, Item); + public: Ref<Texture> image; ItemImage() { type = ITEM_IMAGE; } }; - struct ItemFont : public Item { + class ItemFont : public Item { + GDCLASS(ItemFont, Item); + public: Ref<Font> font; ItemFont() { type = ITEM_FONT; } }; - struct ItemColor : public Item { + class ItemColor : public Item { + GDCLASS(ItemColor, Item); + public: Color color; ItemColor() { type = ITEM_COLOR; } }; - struct ItemUnderline : public Item { + class ItemUnderline : public Item { + GDCLASS(ItemUnderline, Item); + public: ItemUnderline() { type = ITEM_UNDERLINE; } }; - struct ItemStrikethrough : public Item { + class ItemStrikethrough : public Item { + GDCLASS(ItemStrikethrough, Item); + public: ItemStrikethrough() { type = ITEM_STRIKETHROUGH; } }; - struct ItemMeta : public Item { + class ItemMeta : public Item { + GDCLASS(ItemMeta, Item); + public: Variant meta; ItemMeta() { type = ITEM_META; } }; - struct ItemAlign : public Item { + class ItemAlign : public Item { + GDCLASS(ItemAlign, Item); + public: Align align; ItemAlign() { type = ITEM_ALIGN; } }; - struct ItemIndent : public Item { + class ItemIndent : public Item { + GDCLASS(ItemIndent, Item); + public: int level; ItemIndent() { type = ITEM_INDENT; } }; - struct ItemList : public Item { + class ItemList : public Item { + GDCLASS(ItemList, Item); + public: ListType list_type; ItemList() { type = ITEM_LIST; } }; - struct ItemNewline : public Item { + class ItemNewline : public Item { + GDCLASS(ItemNewline, Item); + public: ItemNewline() { type = ITEM_NEWLINE; } }; - struct ItemTable : public Item { + class ItemTable : public Item { + GDCLASS(ItemTable, Item); + public: struct Column { bool expand; int expand_ratio; @@ -221,14 +249,20 @@ private: ItemTable() { type = ITEM_TABLE; } }; - struct ItemFade : public Item { + class ItemFade : public Item { + GDCLASS(ItemFade, Item); + + public: int starting_index; int length; ItemFade() { type = ITEM_FADE; } }; - struct ItemFX : public Item { + class ItemFX : public Item { + GDCLASS(ItemFX, Item); + + public: float elapsed_time; ItemFX() { @@ -236,7 +270,10 @@ private: } }; - struct ItemShake : public ItemFX { + class ItemShake : public ItemFX { + GDCLASS(ItemShake, ItemFX); + + public: int strength; float rate; uint64_t _current_rng; @@ -265,7 +302,10 @@ private: } }; - struct ItemWave : public ItemFX { + class ItemWave : public ItemFX { + GDCLASS(ItemWave, ItemFX); + + public: float frequency; float amplitude; @@ -276,7 +316,10 @@ private: } }; - struct ItemTornado : public ItemFX { + class ItemTornado : public ItemFX { + GDCLASS(ItemTornado, ItemFX); + + public: float radius; float frequency; @@ -287,7 +330,10 @@ private: } }; - struct ItemRainbow : public ItemFX { + class ItemRainbow : public ItemFX { + GDCLASS(ItemRainbow, ItemFX); + + public: float saturation; float value; float frequency; @@ -300,7 +346,10 @@ private: } }; - struct ItemCustomFX : public ItemFX { + class ItemCustomFX : public ItemFX { + GDCLASS(ItemCustomFX, ItemFX); + + public: String identifier; Dictionary environment; |