diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/animation_track_editor.cpp | 1 | ||||
-rw-r--r-- | editor/create_dialog.cpp | 21 | ||||
-rw-r--r-- | editor/create_dialog.h | 1 | ||||
-rw-r--r-- | editor/editor_about.cpp | 1 | ||||
-rw-r--r-- | editor/editor_data.cpp | 20 | ||||
-rw-r--r-- | editor/editor_data.h | 2 | ||||
-rw-r--r-- | editor/groups_editor.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/mesh_instance_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 21 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.h | 1 | ||||
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 9 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 20 | ||||
-rw-r--r-- | editor/script_editor_debugger.cpp | 1 | ||||
-rw-r--r-- | editor/settings_config_dialog.cpp | 10 |
17 files changed, 71 insertions, 47 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 7183d34d4f..33f833afa4 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -5818,6 +5818,7 @@ AnimationTrackEditor::AnimationTrackEditor() { info_message->set_valign(Label::VALIGN_CENTER); info_message->set_align(Label::ALIGN_CENTER); info_message->set_autowrap(true); + info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); info_message->set_anchors_and_margins_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE); main_panel->add_child(info_message); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 5344658223..fb7cf494cd 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -151,6 +151,10 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p if (!ClassDB::is_parent_class(p_type, base_type)) return; } else { + if (!search_loaded_scripts.has(p_type)) { + search_loaded_scripts[p_type] = ed.script_class_load_script(p_type); + } + if (!ScriptServer::is_global_class(p_type) || !ed.script_class_is_parent(p_type, base_type)) return; @@ -352,7 +356,12 @@ void CreateDialog::_update_search() { } else { bool found = false; - String type2 = I->get(); + String type2 = type; + + if (!cpp_type && !search_loaded_scripts.has(type)) { + search_loaded_scripts[type] = ed.script_class_load_script(type); + } + while (type2 != "" && (cpp_type ? ClassDB::is_parent_class(type2, base_type) : ed.script_class_is_parent(type2, base_type)) && type2 != base_type) { if (search_box->get_text().is_subsequence_ofi(type2)) { @@ -361,10 +370,15 @@ void CreateDialog::_update_search() { } type2 = cpp_type ? ClassDB::get_parent_class(type2) : ed.script_class_get_base(type2); + + if (!cpp_type && !search_loaded_scripts.has(type2)) { + search_loaded_scripts[type2] = ed.script_class_load_script(type2); + } } - if (found) - add_type(I->get(), search_options_types, root, &to_select); + if (found) { + add_type(type, search_options_types, root, &to_select); + } } if (EditorNode::get_editor_data().get_custom_types().has(type) && ClassDB::is_parent_class(type, base_type)) { @@ -470,6 +484,7 @@ void CreateDialog::_notification(int p_what) { } break; case NOTIFICATION_POPUP_HIDE: { EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "create_new_node", get_rect()); + search_loaded_scripts.clear(); } break; } } diff --git a/editor/create_dialog.h b/editor/create_dialog.h index f3ed1d7af6..1150ac60da 100644 --- a/editor/create_dialog.h +++ b/editor/create_dialog.h @@ -51,6 +51,7 @@ class CreateDialog : public ConfirmationDialog { LineEdit *search_box; Tree *search_options; HashMap<String, TreeItem *> search_options_types; + HashMap<String, RES> search_loaded_scripts; bool is_replace_mode; String base_type; String preferred_search_result_type; diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index 8a03292708..f75d9c98e0 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -58,6 +58,7 @@ void EditorAbout::_notification(int p_what) { void EditorAbout::_license_tree_selected() { TreeItem *selected = _tpl_tree->get_selected(); + _tpl_text->scroll_to_line(0); _tpl_text->set_text(selected->get_metadata(0)); } diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 777eda2170..5c0adba622 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -870,7 +870,7 @@ bool EditorData::script_class_is_parent(const String &p_class, const String &p_i if (!ScriptServer::is_global_class(p_class)) return false; String base = script_class_get_base(p_class); - Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(p_class), "Script"); + Ref<Script> script = script_class_load_script(p_class); Ref<Script> base_script = script->get_base_script(); while (p_inherits != base) { @@ -889,12 +889,7 @@ bool EditorData::script_class_is_parent(const String &p_class, const String &p_i StringName EditorData::script_class_get_base(const String &p_class) const { - if (!ScriptServer::is_global_class(p_class)) - return StringName(); - - String path = ScriptServer::get_global_class_path(p_class); - - Ref<Script> script = ResourceLoader::load(path, "Script"); + Ref<Script> script = script_class_load_script(p_class); if (script.is_null()) return StringName(); @@ -910,7 +905,7 @@ Object *EditorData::script_class_instance(const String &p_class) { if (ScriptServer::is_global_class(p_class)) { Object *obj = ClassDB::instance(ScriptServer::get_global_class_native_base(p_class)); if (obj) { - RES script = ResourceLoader::load(ScriptServer::get_global_class_path(p_class)); + Ref<Script> script = script_class_load_script(p_class); if (script.is_valid()) obj->set_script(script.get_ref_ptr()); return obj; @@ -919,6 +914,15 @@ Object *EditorData::script_class_instance(const String &p_class) { return NULL; } +Ref<Script> EditorData::script_class_load_script(const String &p_class) const { + + if (!ScriptServer::is_global_class(p_class)) + return Ref<Script>(); + + String path = ScriptServer::get_global_class_path(p_class); + return ResourceLoader::load(path, "Script"); +} + void EditorData::script_class_set_icon_path(const String &p_class, const String &p_icon_path) { _script_class_icon_paths[p_class] = p_icon_path; } diff --git a/editor/editor_data.h b/editor/editor_data.h index df83135942..f9a6587d8d 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -219,6 +219,8 @@ public: StringName script_class_get_base(const String &p_class) const; Object *script_class_instance(const String &p_class); + Ref<Script> script_class_load_script(const String &p_class) const; + StringName script_class_get_name(const String &p_path) const; void script_class_set_name(const String &p_path, const StringName &p_class); diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp index 4cefb53617..74d81bf561 100644 --- a/editor/groups_editor.cpp +++ b/editor/groups_editor.cpp @@ -529,6 +529,7 @@ GroupDialog::GroupDialog() { group_empty->set_valign(Label::VALIGN_CENTER); group_empty->set_align(Label::ALIGN_CENTER); group_empty->set_autowrap(true); + group_empty->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); nodes_to_remove->add_child(group_empty); group_empty->set_anchors_and_margins_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 119c61deb1..d84a67dba1 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1227,8 +1227,8 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo } if (panning) { - if (!b->is_pressed()) { - // Stop panning the viewport (for any mouse button press) + if (!b->is_pressed() && (pan_on_scroll || (b->get_button_index() != BUTTON_WHEEL_DOWN && b->get_button_index() != BUTTON_WHEEL_UP))) { + // Stop panning the viewport (for any mouse button press except zooming) panning = false; } } @@ -1315,6 +1315,7 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) { // Start dragging if we still have nodes if (drag_selection.size() > 0) { + _save_canvas_item_state(drag_selection); drag_from = transform.affine_inverse().xform((b.is_valid()) ? b->get_position() : viewport->get_local_mouse_position()); Vector2 new_pos; if (drag_selection.size() == 1) { @@ -1328,7 +1329,6 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) { } drag_type = DRAG_PIVOT; - _save_canvas_item_state(drag_selection); } return true; } diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp index 635b934333..22df8fd8f4 100644 --- a/editor/plugins/mesh_instance_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_editor_plugin.cpp @@ -180,6 +180,7 @@ void MeshInstanceEditor::_menu_option(int p_option) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(shapes[i]); + cshape->set_transform(node->get_transform()); Node *owner = node->get_owner(); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 603a2365c1..f63445dab8 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -571,6 +571,7 @@ void ScriptTextEditor::_validate_script() { String error_text = "error(" + itos(line) + "," + itos(col) + "): " + errortxt; code_editor->set_error(error_text); code_editor->set_error_pos(line - 1, col - 1); + script_is_valid = false; } else { code_editor->set_error(""); line = -1; @@ -585,6 +586,7 @@ void ScriptTextEditor::_validate_script() { functions.push_back(E->get()); } + script_is_valid = true; } _update_connected_methods(); @@ -967,7 +969,7 @@ void ScriptTextEditor::_update_connected_methods() { text_edit->clear_info_icons(); missing_connections.clear(); - if (!script->is_valid()) { + if (!script_is_valid) { return; } @@ -1000,10 +1002,18 @@ void ScriptTextEditor::_update_connected_methods() { if (!ClassDB::has_method(script->get_instance_base_type(), connection.method)) { int line = -1; - if (script->has_method(connection.method)) { - line = script->get_member_line(connection.method); - text_edit->set_line_info_icon(line - 1, get_parent_control()->get_icon("Slot", "EditorIcons"), connection.method); - methods_found.insert(connection.method); + + for (int j = 0; j < functions.size(); j++) { + String name = functions[j].get_slice(":", 0); + if (name == connection.method) { + line = functions[j].get_slice(":", 1).to_int(); + text_edit->set_line_info_icon(line - 1, get_parent_control()->get_icon("Slot", "EditorIcons"), connection.method); + methods_found.insert(connection.method); + break; + } + } + + if (line >= 0) { continue; } @@ -1728,6 +1738,7 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p ScriptTextEditor::ScriptTextEditor() { theme_loaded = false; + script_is_valid = false; VSplitContainer *editor_box = memnew(VSplitContainer); add_child(editor_box); diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index eba75befd4..2ba0be8feb 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -59,6 +59,7 @@ class ScriptTextEditor : public ScriptEditorBase { RichTextLabel *warnings_panel; Ref<Script> script; + bool script_is_valid; Vector<String> functions; diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 2d66087699..10567557d6 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -1996,6 +1996,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { info_message->set_valign(Label::VALIGN_CENTER); info_message->set_align(Label::ALIGN_CENTER); info_message->set_autowrap(true); + info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); info_message->set_anchors_and_margins_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE); palette->add_child(info_message); diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index d81c6d3f96..cc4c21cc04 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -584,6 +584,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { empty_message->set_valign(Label::VALIGN_CENTER); empty_message->set_align(Label::ALIGN_CENTER); empty_message->set_autowrap(true); + empty_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); empty_message->set_v_size_flags(SIZE_EXPAND_FILL); main_vb->add_child(empty_message); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index e96f2e55c2..90eb3045df 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -2531,9 +2531,11 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Alpha", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("Binormal", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "binormal"), "binormal", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("Color", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("DepthTexture", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "depth_texture"), "depth_texture", VisualShaderNode::PORT_TYPE_SAMPLER, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("FragCoord", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "fragcoord"), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("FrontFacing", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "front_facing"), "front_facing", VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("PointCoord", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "point_coord"), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("ScreenTexture", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_texture"), "screen_texture", VisualShaderNode::PORT_TYPE_SAMPLER, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("ScreenUV", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_uv"), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("Side", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "side"), "side", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("Tangent", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "tangent"), "tangent", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); @@ -2567,9 +2569,12 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("FragCoord", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "fragcoord"), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("LightPass", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "light_pass"), "light_pass", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("NormalTexture", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "normal_texture"), "normal_texture", VisualShaderNode::PORT_TYPE_SAMPLER, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("PointCoord", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "point_coord"), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("ScreenPixelSize", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_pixel_size"), "screen_pixel_size", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("ScreenTexture", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_texture"), "screen_texture", VisualShaderNode::PORT_TYPE_SAMPLER, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("ScreenUV", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "screen_uv"), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("Texture", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "texture"), "texture", VisualShaderNode::PORT_TYPE_SAMPLER, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("FragCoord", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "fragcoord"), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("LightAlpha", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_alpha"), "light_alpha", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); @@ -2581,6 +2586,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("PointCoord", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "point_coord"), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("ScreenUV", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "screen_uv"), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("ShadowColor", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "shadow_color"), "shadow_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("Texture", "Input", "Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "texture"), "texture", VisualShaderNode::PORT_TYPE_SAMPLER, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("Extra", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "extra"), "extra", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("LightPass", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "light_pass"), "light_pass", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); @@ -2878,11 +2884,12 @@ public: void setup(const Ref<VisualShaderNodeInput> &p_input) { input = p_input; - Ref<Texture> type_icon[4] = { + Ref<Texture> type_icon[5] = { EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons"), EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons"), EditorNode::get_singleton()->get_gui_base()->get_icon("bool", "EditorIcons"), EditorNode::get_singleton()->get_gui_base()->get_icon("Transform", "EditorIcons"), + EditorNode::get_singleton()->get_gui_base()->get_icon("ImageTexture", "EditorIcons"), }; add_item("[None]"); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index f56f7ef7ca..ca5858b768 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -442,15 +442,7 @@ void ProjectSettingsEditor::_wait_for_key(const Ref<InputEvent> &p_event) { if (k.is_valid() && k->is_pressed() && k->get_scancode() != 0) { last_wait_for_key = p_event; - String str = keycode_get_string(k->get_scancode()).capitalize(); - if (k->get_metakey()) - str = vformat("%s+", find_keycode_name(KEY_META)) + str; - if (k->get_shift()) - str = TTR("Shift+") + str; - if (k->get_alt()) - str = TTR("Alt+") + str; - if (k->get_control()) - str = TTR("Control+") + str; + const String str = keycode_get_string(k->get_scancode_with_modifiers()); press_a_key_label->set_text(str); press_a_key->accept_event(); @@ -740,15 +732,7 @@ void ProjectSettingsEditor::_update_actions() { Ref<InputEventKey> k = event; if (k.is_valid()) { - String str = keycode_get_string(k->get_scancode()).capitalize(); - if (k->get_metakey()) - str = vformat("%s+", find_keycode_name(KEY_META)) + str; - if (k->get_shift()) - str = TTR("Shift+") + str; - if (k->get_alt()) - str = TTR("Alt+") + str; - if (k->get_control()) - str = TTR("Control+") + str; + const String str = keycode_get_string(k->get_scancode_with_modifiers()); action2->set_text(0, str); action2->set_icon(0, get_icon("Keyboard", "EditorIcons")); diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index c1899b2bde..06acdcd4e2 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -2424,6 +2424,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { info_message->set_valign(Label::VALIGN_CENTER); info_message->set_align(Label::ALIGN_CENTER); info_message->set_autowrap(true); + info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); info_message->set_anchors_and_margins_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE); perf_draw->add_child(info_message); } diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index f8425ebe22..a38c6b98cc 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -310,15 +310,7 @@ void EditorSettingsDialog::_wait_for_key(const Ref<InputEvent> &p_event) { if (k.is_valid() && k->is_pressed() && k->get_scancode() != 0) { last_wait_for_key = k; - String str = keycode_get_string(k->get_scancode()).capitalize(); - if (k->get_metakey()) - str = vformat("%s+", find_keycode_name(KEY_META)) + str; - if (k->get_shift()) - str = TTR("Shift+") + str; - if (k->get_alt()) - str = TTR("Alt+") + str; - if (k->get_control()) - str = TTR("Control+") + str; + const String str = keycode_get_string(k->get_scancode_with_modifiers()); press_a_key_label->set_text(str); press_a_key->accept_event(); |