diff options
Diffstat (limited to 'editor')
164 files changed, 1698 insertions, 1126 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 8fd1f5951e..f36e84dab6 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -1783,7 +1783,8 @@ AnimationTimelineEdit::AnimationTimelineEdit() { length->set_tooltip(TTR("Animation length (seconds)")); length->connect("value_changed", callable_mp(this, &AnimationTimelineEdit::_anim_length_changed)); len_hb->add_child(length); - loop = memnew(ToolButton); + loop = memnew(Button); + loop->set_flat(true); loop->set_tooltip(TTR("Animation Looping")); loop->connect("pressed", callable_mp(this, &AnimationTimelineEdit::_anim_loop_pressed)); loop->set_toggle_mode(true); @@ -2786,7 +2787,8 @@ Variant AnimationTrackEdit::get_drag_data(const Point2 &p_point) { drag_data["group"] = base_path; drag_data["index"] = track; - ToolButton *tb = memnew(ToolButton); + Button *tb = memnew(Button); + tb->set_flat(true); tb->set_text(path_cache); tb->set_icon(icon_cache); set_drag_preview(tb); @@ -5640,14 +5642,16 @@ AnimationTrackEditor::AnimationTrackEditor() { bottom_hb->add_spacer(); - selected_filter = memnew(ToolButton); + selected_filter = memnew(Button); + selected_filter->set_flat(true); selected_filter->connect("pressed", callable_mp(this, &AnimationTrackEditor::_view_group_toggle)); //same function works the same selected_filter->set_toggle_mode(true); selected_filter->set_tooltip(TTR("Only show tracks from nodes selected in tree.")); bottom_hb->add_child(selected_filter); - view_group = memnew(ToolButton); + view_group = memnew(Button); + view_group->set_flat(true); view_group->connect("pressed", callable_mp(this, &AnimationTrackEditor::_view_group_toggle)); view_group->set_toggle_mode(true); view_group->set_tooltip(TTR("Group tracks by node or display them as plain list.")); @@ -5655,7 +5659,8 @@ AnimationTrackEditor::AnimationTrackEditor() { bottom_hb->add_child(view_group); bottom_hb->add_child(memnew(VSeparator)); - snap = memnew(ToolButton); + snap = memnew(Button); + snap->set_flat(true); snap->set_text(TTR("Snap:") + " "); bottom_hb->add_child(snap); snap->set_disabled(true); diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 6a46a1e3ff..911280dc3b 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -44,7 +44,6 @@ #include "scene/gui/spin_box.h" #include "scene/gui/tab_container.h" #include "scene/gui/texture_rect.h" -#include "scene/gui/tool_button.h" #include "scene/resources/animation.h" #include "scene_tree_editor.h" @@ -59,7 +58,7 @@ class AnimationTimelineEdit : public Range { HBoxContainer *len_hb; EditorSpinSlider *length; - ToolButton *loop; + Button *loop; TextureRect *time_icon; MenuButton *add_track; @@ -310,7 +309,7 @@ class AnimationTrackEditor : public VBoxContainer { HSlider *zoom; EditorSpinSlider *step; TextureRect *zoom_icon; - ToolButton *snap; + Button *snap; OptionButton *snap_mode; Button *imported_anim_warning; @@ -457,8 +456,8 @@ class AnimationTrackEditor : public VBoxContainer { void _anim_duplicate_keys(bool transpose); void _view_group_toggle(); - ToolButton *view_group; - ToolButton *selected_filter; + Button *view_group; + Button *selected_filter; void _selection_changed(); diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 95c7cc0bf1..b73a27214d 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -166,20 +166,47 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) } void FindReplaceBar::_replace() { - if (result_line != -1 && result_col != -1) { - text_edit->begin_complex_operation(); + bool selection_enabled = text_edit->is_selection_active(); + Point2i selection_begin, selection_end; + if (selection_enabled) { + selection_begin = Point2i(text_edit->get_selection_from_line(), text_edit->get_selection_from_column()); + selection_end = Point2i(text_edit->get_selection_to_line(), text_edit->get_selection_to_column()); + } - text_edit->unfold_line(result_line); - text_edit->select(result_line, result_col, result_line, result_col + get_search_text().length()); - text_edit->insert_text_at_cursor(get_replace_text()); + String replace_text = get_replace_text(); + int search_text_len = get_search_text().length(); - text_edit->end_complex_operation(); + text_edit->begin_complex_operation(); + if (selection_enabled && is_selection_only()) { // To restrict search_current() to selected region + text_edit->cursor_set_line(selection_begin.width); + text_edit->cursor_set_column(selection_begin.height); + } - results_count = -1; + if (search_current()) { + text_edit->unfold_line(result_line); + text_edit->select(result_line, result_col, result_line, result_col + search_text_len); + + if (selection_enabled && is_selection_only()) { + Point2i match_from(result_line, result_col); + Point2i match_to(result_line, result_col + search_text_len); + if (!(match_from < selection_begin || match_to > selection_end)) { + text_edit->insert_text_at_cursor(replace_text); + if (match_to.x == selection_end.x) { // Adjust selection bounds if necessary + selection_end.y += replace_text.length() - search_text_len; + } + } + } else { + text_edit->insert_text_at_cursor(replace_text); + } } + text_edit->end_complex_operation(); + results_count = -1; - if (!search_current()) { - search_next(); + if (selection_enabled && is_selection_only()) { + // Reselect in order to keep 'Replace' restricted to selection + text_edit->select(selection_begin.x, selection_begin.y, selection_end.x, selection_end.y); + } else { + text_edit->deselect(); } } @@ -601,12 +628,14 @@ FindReplaceBar::FindReplaceBar() { hbc_button_search->add_child(matches_label); matches_label->hide(); - find_prev = memnew(ToolButton); + find_prev = memnew(Button); + find_prev->set_flat(true); hbc_button_search->add_child(find_prev); find_prev->set_focus_mode(FOCUS_NONE); find_prev->connect("pressed", callable_mp(this, &FindReplaceBar::search_prev)); - find_next = memnew(ToolButton); + find_next = memnew(Button); + find_next->set_flat(true); hbc_button_search->add_child(find_next); find_next->set_focus_mode(FOCUS_NONE); find_next->connect("pressed", callable_mp(this, &FindReplaceBar::search_next)); @@ -1512,7 +1541,7 @@ void CodeTextEditor::_toggle_scripts_pressed() { void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) { - emit_signal("error_pressed"); + goto_error(); } } @@ -1622,7 +1651,6 @@ void CodeTextEditor::_bind_methods() { ADD_SIGNAL(MethodInfo("validate_script")); ADD_SIGNAL(MethodInfo("load_theme_settings")); ADD_SIGNAL(MethodInfo("show_warnings_panel")); - ADD_SIGNAL(MethodInfo("error_pressed")); } void CodeTextEditor::set_code_complete_func(CodeTextEditorCodeCompleteFunc p_code_complete_func, void *p_ud) { @@ -1679,7 +1707,8 @@ CodeTextEditor::CodeTextEditor() { error_line = 0; error_column = 0; - toggle_scripts_button = memnew(ToolButton); + toggle_scripts_button = memnew(Button); + toggle_scripts_button->set_flat(true); toggle_scripts_button->connect("pressed", callable_mp(this, &CodeTextEditor::_toggle_scripts_pressed)); status_bar->add_child(toggle_scripts_button); toggle_scripts_button->hide(); @@ -1699,7 +1728,8 @@ CodeTextEditor::CodeTextEditor() { find_replace_bar->connect("error", callable_mp(error, &Label::set_text)); // Warnings - warning_button = memnew(ToolButton); + warning_button = memnew(Button); + warning_button->set_flat(true); status_bar->add_child(warning_button); warning_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER); warning_button->set_default_cursor_shape(CURSOR_POINTING_HAND); diff --git a/editor/code_editor.h b/editor/code_editor.h index d806be885f..ab298202bd 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -37,7 +37,6 @@ #include "scene/gui/dialogs.h" #include "scene/gui/line_edit.h" #include "scene/gui/text_edit.h" -#include "scene/gui/tool_button.h" #include "scene/main/timer.h" class GotoLineDialog : public ConfirmationDialog { @@ -63,8 +62,8 @@ class FindReplaceBar : public HBoxContainer { LineEdit *search_text; Label *matches_label; - ToolButton *find_prev; - ToolButton *find_next; + Button *find_prev; + Button *find_next; CheckBox *case_sensitive; CheckBox *whole_words; TextureButton *hide_button; @@ -142,8 +141,8 @@ class CodeTextEditor : public VBoxContainer { FindReplaceBar *find_replace_bar; HBoxContainer *status_bar; - ToolButton *toggle_scripts_button; - ToolButton *warning_button; + Button *toggle_scripts_button; + Button *warning_button; Label *warning_count_label; Label *line_and_col_txt; diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 6507956d07..facd57418d 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -108,17 +108,26 @@ public: * Signal automatically called by parent dialog. */ void ConnectDialog::ok_pressed() { - if (dst_method->get_text() == "") { + String method_name = dst_method->get_text(); + + if (method_name == "") { error->set_text(TTR("Method in target node must be specified.")); error->popup_centered(); return; } + + if (!method_name.strip_edges().is_valid_identifier()) { + error->set_text(TTR("Method name must be a valid identifier.")); + error->popup_centered(); + return; + } + Node *target = tree->get_selected(); if (!target) { return; // Nothing selected in the tree, not an error. } if (target->get_script().is_null()) { - if (!target->has_method(dst_method->get_text())) { + if (!target->has_method(method_name)) { error->set_text(TTR("Target method not found. Specify a valid method or attach a script to the target node.")); error->popup_centered(); return; diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 73468f8ce0..310de9dd90 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -673,7 +673,8 @@ Variant CreateDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) { d["type"] = "create_favorite_drag"; d["class"] = ti->get_text(0); - ToolButton *tb = memnew(ToolButton); + Button *tb = memnew(Button); + tb->set_flat(true); tb->set_icon(ti->get_icon(0)); tb->set_text(ti->get_text(0)); favorites->set_drag_preview(tb); diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 49137f76fa..6b010fbfb5 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -743,18 +743,19 @@ void ScriptEditorDebugger::_performance_draw() { info_message->hide(); - Ref<StyleBox> graph_sb = get_theme_stylebox("normal", "TextEdit"); - Ref<Font> graph_font = get_theme_font("font", "TextEdit"); + const Ref<StyleBox> graph_sb = get_theme_stylebox("normal", "TextEdit"); + const Ref<Font> graph_font = get_theme_font("font", "TextEdit"); - int cols = Math::ceil(Math::sqrt((float)which.size())); + const int cols = Math::ceil(Math::sqrt((float)which.size())); int rows = Math::ceil((float)which.size() / cols); if (which.size() == 1) { rows = 1; } - int margin = 3; - int point_sep = 5; - Size2i s = Size2i(perf_draw->get_size()) / Size2i(cols, rows); + const int margin = 3; + const int point_sep = 5; + const Size2i s = Size2i(perf_draw->get_size()) / Size2i(cols, rows); + for (int i = 0; i < which.size(); i++) { Point2i p(i % cols, i / cols); Rect2i r(p * s, s); @@ -763,22 +764,78 @@ void ScriptEditorDebugger::_performance_draw() { perf_draw->draw_style_box(graph_sb, r); r.position += graph_sb->get_offset(); r.size -= graph_sb->get_minimum_size(); - int pi = which[i]; - Color c = get_theme_color("accent_color", "Editor"); - float h = (float)which[i] / (float)(perf_items.size()); - // Use a darker color on light backgrounds for better visibility - float value_multiplier = EditorSettings::get_singleton()->is_dark_theme() ? 1.4 : 0.55; - c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * value_multiplier); - - c.a = 0.6; - perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x); - c.a = 0.9; - perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent() + graph_font->get_height()), perf_items[pi]->get_text(1), c, r.size.y); - - float spacing = point_sep / float(cols); + const int pi = which[i]; + + // Draw horizontal lines with labels. + + int nb_lines = 5; + // Draw less lines if the monitor isn't tall enough to display 5 labels. + if (r.size.height <= 160 * EDSCALE) { + nb_lines = 3; + } else if (r.size.height <= 240 * EDSCALE) { + nb_lines = 4; + } + + const float inv_nb_lines = 1.0 / nb_lines; + + for (int line = 0; line < nb_lines; line += 1) { + const int from_x = r.position.x; + const int to_x = r.position.x + r.size.width; + const int y = r.position.y + (r.size.height * inv_nb_lines + line * inv_nb_lines * r.size.height); + perf_draw->draw_line( + Point2(from_x, y), + Point2i(to_x, y), + Color(0.5, 0.5, 0.5, 0.25), + Math::round(EDSCALE)); + + String label; + switch (Performance::MonitorType((int)perf_items[pi]->get_metadata(1))) { + case Performance::MONITOR_TYPE_MEMORY: { + label = String::humanize_size(Math::ceil((1 - inv_nb_lines - inv_nb_lines * line) * perf_max[pi])); + } break; + case Performance::MONITOR_TYPE_TIME: { + label = rtos((1 - inv_nb_lines - inv_nb_lines * line) * perf_max[pi] * 1000).pad_decimals(2) + " ms"; + } break; + default: { + label = itos(Math::ceil((1 - inv_nb_lines - inv_nb_lines * line) * perf_max[pi])); + } break; + } + + perf_draw->draw_string( + graph_font, + Point2(from_x, y - graph_font->get_ascent() * 0.25), + label, + Color(0.5, 0.5, 0.5, 1.0)); + } + + const float h = (float)which[i] / (float)(perf_items.size()); + // Use a darker color on light backgrounds for better visibility. + const float value_multiplier = EditorSettings::get_singleton()->is_dark_theme() ? 1.4 : 0.55; + Color color = get_theme_color("accent_color", "Editor"); + color.set_hsv(Math::fmod(h + 0.4, 0.9), color.get_s() * 0.9, color.get_v() * value_multiplier); + + // Draw the monitor name in the top-left corner. + color.a = 0.6; + perf_draw->draw_string( + graph_font, + r.position + Point2(0, graph_font->get_ascent()), + perf_items[pi]->get_text(0), + color, + r.size.x); + + // Draw the monitor value in the top-left corner, just below the name. + color.a = 0.9; + perf_draw->draw_string( + graph_font, + r.position + Point2(0, graph_font->get_ascent() + graph_font->get_height()), + perf_items[pi]->get_text(1), + color, + r.size.y); + + const float spacing = point_sep / float(cols); float from = r.size.width; - List<Vector<float>>::Element *E = perf_history.front(); + const List<Vector<float>>::Element *E = perf_history.front(); float prev = -1; while (from >= 0 && E) { float m = perf_max[pi]; @@ -789,7 +846,11 @@ void ScriptEditorDebugger::_performance_draw() { h2 = (1.0 - h2) * r.size.y; if (E != perf_history.front()) { - perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, Math::round(EDSCALE)); + perf_draw->draw_line( + r.position + Point2(from, h2), + r.position + Point2(from + spacing, prev), + color, + Math::round(EDSCALE)); } prev = h2; E = E->next(); @@ -1517,27 +1578,31 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { hbc->add_child(memnew(VSeparator)); - skip_breakpoints = memnew(ToolButton); + skip_breakpoints = memnew(Button); + skip_breakpoints->set_flat(true); hbc->add_child(skip_breakpoints); skip_breakpoints->set_tooltip(TTR("Skip Breakpoints")); skip_breakpoints->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_skip_breakpoints)); hbc->add_child(memnew(VSeparator)); - copy = memnew(ToolButton); + copy = memnew(Button); + copy->set_flat(true); hbc->add_child(copy); copy->set_tooltip(TTR("Copy Error")); copy->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_copy)); hbc->add_child(memnew(VSeparator)); - step = memnew(ToolButton); + step = memnew(Button); + step->set_flat(true); hbc->add_child(step); step->set_tooltip(TTR("Step Into")); step->set_shortcut(ED_GET_SHORTCUT("debugger/step_into")); step->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_step)); - next = memnew(ToolButton); + next = memnew(Button); + next->set_flat(true); hbc->add_child(next); next->set_tooltip(TTR("Step Over")); next->set_shortcut(ED_GET_SHORTCUT("debugger/step_over")); @@ -1545,13 +1610,15 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { hbc->add_child(memnew(VSeparator)); - dobreak = memnew(ToolButton); + dobreak = memnew(Button); + dobreak->set_flat(true); hbc->add_child(dobreak); dobreak->set_tooltip(TTR("Break")); dobreak->set_shortcut(ED_GET_SHORTCUT("debugger/break")); dobreak->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_break)); - docontinue = memnew(ToolButton); + docontinue = memnew(Button); + docontinue->set_flat(true); hbc->add_child(docontinue); docontinue->set_tooltip(TTR("Continue")); docontinue->set_shortcut(ED_GET_SHORTCUT("debugger/continue")); @@ -1730,9 +1797,11 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { vmem_total->set_editable(false); vmem_total->set_custom_minimum_size(Size2(100, 0) * EDSCALE); vmem_hb->add_child(vmem_total); - vmem_refresh = memnew(ToolButton); + vmem_refresh = memnew(Button); + vmem_refresh->set_flat(true); vmem_hb->add_child(vmem_refresh); - vmem_export = memnew(ToolButton); + vmem_export = memnew(Button); + vmem_export->set_flat(true); vmem_export->set_tooltip(TTR("Export list to a CSV file")); vmem_hb->add_child(vmem_export); vmem_vb->add_child(vmem_hb); diff --git a/editor/doc_data.cpp b/editor/doc_data.cpp index c52d91b03d..54acbe9559 100644 --- a/editor/doc_data.cpp +++ b/editor/doc_data.cpp @@ -662,18 +662,19 @@ void DocData::generate(bool p_basic_types) { } } - //built in script reference + // Built-in script reference. + // We only add a doc entry for languages which actually define any built-in + // methods or constants. { for (int i = 0; i < ScriptServer::get_language_count(); i++) { ScriptLanguage *lang = ScriptServer::get_language(i); String cname = "@" + lang->get_name(); - class_list[cname] = ClassDoc(); - ClassDoc &c = class_list[cname]; + ClassDoc c; c.name = cname; + // Get functions. List<MethodInfo> minfo; - lang->get_public_functions(&minfo); for (List<MethodInfo>::Element *E = minfo.front(); E; E = E->next()) { @@ -706,6 +707,7 @@ void DocData::generate(bool p_basic_types) { c.methods.push_back(md); } + // Get constants. List<Pair<String, Variant>> cinfo; lang->get_public_constants(&cinfo); @@ -715,6 +717,13 @@ void DocData::generate(bool p_basic_types) { cd.value = E->get().second; c.constants.push_back(cd); } + + // Skip adding the lang if it doesn't expose anything (e.g. C#). + if (c.methods.empty() && c.constants.empty()) { + continue; + } + + class_list[cname] = c; } } } diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 5cf5201b18..10825973ae 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -782,19 +782,22 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { HBoxContainer *hbc = memnew(HBoxContainer); vb->add_child(hbc); - solo = memnew(ToolButton); + solo = memnew(Button); + solo->set_flat(true); solo->set_toggle_mode(true); solo->set_tooltip(TTR("Solo")); solo->set_focus_mode(FOCUS_NONE); solo->connect("pressed", callable_mp(this, &EditorAudioBus::_solo_toggled)); hbc->add_child(solo); - mute = memnew(ToolButton); + mute = memnew(Button); + mute->set_flat(true); mute->set_toggle_mode(true); mute->set_tooltip(TTR("Mute")); mute->set_focus_mode(FOCUS_NONE); mute->connect("pressed", callable_mp(this, &EditorAudioBus::_mute_toggled)); hbc->add_child(mute); - bypass = memnew(ToolButton); + bypass = memnew(Button); + bypass->set_flat(true); bypass->set_toggle_mode(true); bypass->set_tooltip(TTR("Bypass")); bypass->set_focus_mode(FOCUS_NONE); diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h index 65caf84f0f..5d5502002d 100644 --- a/editor/editor_audio_buses.h +++ b/editor/editor_audio_buses.h @@ -45,7 +45,6 @@ #include "scene/gui/slider.h" #include "scene/gui/texture_progress.h" #include "scene/gui/texture_rect.h" -#include "scene/gui/tool_button.h" #include "scene/gui/tree.h" class EditorAudioBuses; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 25594bf7c8..951bec2c83 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -100,7 +100,6 @@ void EditorExportPreset::update_files_to_export() { for (int i = 0; i < to_remove.size(); ++i) { selected_files.erase(to_remove[i]); } - EditorExport::singleton->save_presets(); } Vector<String> EditorExportPreset::get_files_to_export() const { diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 5ae5d1cb31..663f3dd856 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -1455,11 +1455,14 @@ EditorFileDialog::EditorFileDialog() { HBoxContainer *pathhb = memnew(HBoxContainer); - dir_prev = memnew(ToolButton); + dir_prev = memnew(Button); + dir_prev->set_flat(true); dir_prev->set_tooltip(TTR("Go to previous folder.")); - dir_next = memnew(ToolButton); + dir_next = memnew(Button); + dir_next->set_flat(true); dir_next->set_tooltip(TTR("Go to next folder.")); - dir_up = memnew(ToolButton); + dir_up = memnew(Button); + dir_up->set_flat(true); dir_up->set_tooltip(TTR("Go to parent folder.")); pathhb->add_child(dir_prev); @@ -1479,18 +1482,21 @@ EditorFileDialog::EditorFileDialog() { pathhb->add_child(dir); dir->set_h_size_flags(Control::SIZE_EXPAND_FILL); - refresh = memnew(ToolButton); + refresh = memnew(Button); + refresh->set_flat(true); refresh->set_tooltip(TTR("Refresh files.")); refresh->connect("pressed", callable_mp(this, &EditorFileDialog::update_file_list)); pathhb->add_child(refresh); - favorite = memnew(ToolButton); + favorite = memnew(Button); + favorite->set_flat(true); favorite->set_toggle_mode(true); favorite->set_tooltip(TTR("(Un)favorite current folder.")); favorite->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_pressed)); pathhb->add_child(favorite); - show_hidden = memnew(ToolButton); + show_hidden = memnew(Button); + show_hidden->set_flat(true); show_hidden->set_toggle_mode(true); show_hidden->set_pressed(is_showing_hidden_files()); show_hidden->set_tooltip(TTR("Toggle the visibility of hidden files.")); @@ -1502,7 +1508,8 @@ EditorFileDialog::EditorFileDialog() { Ref<ButtonGroup> view_mode_group; view_mode_group.instance(); - mode_thumbnails = memnew(ToolButton); + mode_thumbnails = memnew(Button); + mode_thumbnails->set_flat(true); mode_thumbnails->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode), varray(DISPLAY_THUMBNAILS)); mode_thumbnails->set_toggle_mode(true); mode_thumbnails->set_pressed(display_mode == DISPLAY_THUMBNAILS); @@ -1510,7 +1517,8 @@ EditorFileDialog::EditorFileDialog() { mode_thumbnails->set_tooltip(TTR("View items as a grid of thumbnails.")); pathhb->add_child(mode_thumbnails); - mode_list = memnew(ToolButton); + mode_list = memnew(Button); + mode_list->set_flat(true); mode_list->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode), varray(DISPLAY_LIST)); mode_list->set_toggle_mode(true); mode_list->set_pressed(display_mode == DISPLAY_LIST); @@ -1547,10 +1555,12 @@ EditorFileDialog::EditorFileDialog() { fav_vb->add_child(fav_hb); fav_hb->add_child(memnew(Label(TTR("Favorites:")))); fav_hb->add_spacer(); - fav_up = memnew(ToolButton); + fav_up = memnew(Button); + fav_up->set_flat(true); fav_hb->add_child(fav_up); fav_up->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_move_up)); - fav_down = memnew(ToolButton); + fav_down = memnew(Button); + fav_down->set_flat(true); fav_hb->add_child(fav_down); fav_down->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_move_down)); diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index cbedfc72a6..1e224b933d 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -40,7 +40,6 @@ #include "scene/gui/separator.h" #include "scene/gui/split_container.h" #include "scene/gui/texture_rect.h" -#include "scene/gui/tool_button.h" class DependencyRemoveDialog; @@ -95,9 +94,9 @@ private: bool can_create_dir; LineEdit *dir; - ToolButton *dir_prev; - ToolButton *dir_next; - ToolButton *dir_up; + Button *dir_prev; + Button *dir_next; + Button *dir_up; HBoxContainer *drives_container; HBoxContainer *shortcuts_container; @@ -116,15 +115,15 @@ private: ConfirmationDialog *confirm_save; DependencyRemoveDialog *remove_dialog; - ToolButton *mode_thumbnails; - ToolButton *mode_list; + Button *mode_thumbnails; + Button *mode_list; - ToolButton *refresh; - ToolButton *favorite; - ToolButton *show_hidden; + Button *refresh; + Button *favorite; + Button *show_hidden; - ToolButton *fav_up; - ToolButton *fav_down; + Button *fav_up; + Button *fav_down; ItemList *favorites; ItemList *recent; diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index bad2203423..2a59aadd61 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -243,6 +243,9 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview if (p_overview) { class_desc->push_cell(); class_desc->push_align(RichTextLabel::ALIGN_RIGHT); + } else { + static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; + class_desc->add_text(String(prefix)); } _add_type(p_method.return_type, p_method.return_enum); @@ -378,7 +381,6 @@ void EditorHelp::_update_doc() { class_desc->push_color(title_color); class_desc->push_font(doc_font); class_desc->add_text(TTR("Inherits:") + " "); - class_desc->pop(); String inherits = cd.inherits; @@ -393,6 +395,7 @@ void EditorHelp::_update_doc() { } class_desc->pop(); + class_desc->pop(); class_desc->add_newline(); } @@ -401,13 +404,12 @@ void EditorHelp::_update_doc() { bool found = false; bool prev = false; + class_desc->push_font(doc_font); for (Map<String, DocData::ClassDoc>::Element *E = doc->class_list.front(); E; E = E->next()) { if (E->get().inherits == cd.name) { if (!found) { class_desc->push_color(title_color); - class_desc->push_font(doc_font); class_desc->add_text(TTR("Inherited by:") + " "); - class_desc->pop(); found = true; } @@ -419,6 +421,7 @@ void EditorHelp::_update_doc() { prev = true; } } + class_desc->pop(); if (found) { class_desc->pop(); @@ -758,6 +761,8 @@ void EditorHelp::_update_doc() { signal_line[cd.signals[i].name] = class_desc->get_line_count() - 2; //gets overridden if description class_desc->push_font(doc_code_font); // monofont class_desc->push_color(headline_color); + static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; + class_desc->add_text(String(prefix)); _add_text(cd.signals[i].name); class_desc->pop(); class_desc->push_color(symbol_color); @@ -835,10 +840,10 @@ void EditorHelp::_update_doc() { for (Map<String, Vector<DocData::ConstantDoc>>::Element *E = enums.front(); E; E = E->next()) { enum_line[E->key()] = class_desc->get_line_count() - 2; + class_desc->push_font(doc_code_font); class_desc->push_color(title_color); class_desc->add_text("enum "); class_desc->pop(); - class_desc->push_font(doc_code_font); String e = E->key(); if ((e.get_slice_count(".") > 1) && (e.get_slice(".", 0) == edited_class)) { e = e.get_slice(".", 1); @@ -851,6 +856,8 @@ void EditorHelp::_update_doc() { class_desc->push_color(symbol_color); class_desc->add_text(":"); class_desc->pop(); + + class_desc->add_newline(); class_desc->add_newline(); class_desc->push_indent(1); @@ -869,6 +876,8 @@ void EditorHelp::_update_doc() { class_desc->push_font(doc_code_font); class_desc->push_color(headline_color); + static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; + class_desc->add_text(String(prefix)); _add_text(enum_list[i].name); class_desc->pop(); class_desc->push_color(symbol_color); @@ -880,14 +889,15 @@ void EditorHelp::_update_doc() { class_desc->pop(); if (enum_list[i].description != "") { class_desc->push_font(doc_font); - //class_desc->add_text(" "); - class_desc->push_indent(1); class_desc->push_color(comment_color); + static const CharType dash[6] = { ' ', ' ', 0x2013 /* en dash */, ' ', ' ', 0 }; + class_desc->add_text(String(dash)); _add_text(DTR(enum_list[i].description)); class_desc->pop(); class_desc->pop(); - class_desc->pop(); // indent - class_desc->add_newline(); + if (DTR(enum_list[i].description).find("\n") > 0) { + class_desc->add_newline(); + } } class_desc->add_newline(); @@ -931,6 +941,9 @@ void EditorHelp::_update_doc() { class_desc->add_text(String(prefix)); class_desc->pop(); } + } else { + static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; + class_desc->add_text(String(prefix)); } class_desc->push_color(headline_color); @@ -946,13 +959,15 @@ void EditorHelp::_update_doc() { class_desc->pop(); if (constants[i].description != "") { class_desc->push_font(doc_font); - class_desc->push_indent(1); class_desc->push_color(comment_color); + static const CharType dash[6] = { ' ', ' ', 0x2013 /* en dash */, ' ', ' ', 0 }; + class_desc->add_text(String(dash)); _add_text(DTR(constants[i].description)); class_desc->pop(); class_desc->pop(); - class_desc->pop(); // indent - class_desc->add_newline(); + if (DTR(constants[i].description).find("\n") > 0) { + class_desc->add_newline(); + } } class_desc->add_newline(); @@ -987,6 +1002,9 @@ void EditorHelp::_update_doc() { class_desc->push_cell(); class_desc->push_font(doc_code_font); + static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; + class_desc->add_text(String(prefix)); + _add_type(cd.properties[i].type, cd.properties[i].enumeration); class_desc->add_text(" "); class_desc->pop(); // font @@ -1015,6 +1033,11 @@ void EditorHelp::_update_doc() { class_desc->pop(); // font class_desc->pop(); // cell + Map<String, DocData::MethodDoc> method_map; + for (int j = 0; j < methods.size(); j++) { + method_map[methods[j].name] = methods[j]; + } + if (cd.properties[i].setter != "") { class_desc->push_cell(); class_desc->pop(); // cell @@ -1022,7 +1045,14 @@ void EditorHelp::_update_doc() { class_desc->push_cell(); class_desc->push_font(doc_code_font); class_desc->push_color(text_color); - class_desc->add_text(cd.properties[i].setter + TTR("(value)")); + if (method_map[cd.properties[i].setter].arguments.size() > 1) { + // Setters with additional arguments are exposed in the method list, so we link them here for quick access. + class_desc->push_meta("@method " + cd.properties[i].setter); + class_desc->add_text(cd.properties[i].setter + TTR("(value)")); + class_desc->pop(); + } else { + class_desc->add_text(cd.properties[i].setter + TTR("(value)")); + } class_desc->pop(); // color class_desc->push_color(comment_color); class_desc->add_text(" setter"); @@ -1039,7 +1069,14 @@ void EditorHelp::_update_doc() { class_desc->push_cell(); class_desc->push_font(doc_code_font); class_desc->push_color(text_color); - class_desc->add_text(cd.properties[i].getter + "()"); + if (method_map[cd.properties[i].getter].arguments.size() > 0) { + // Getters with additional arguments are exposed in the method list, so we link them here for quick access. + class_desc->push_meta("@method " + cd.properties[i].getter); + class_desc->add_text(cd.properties[i].getter + "()"); + class_desc->pop(); + } else { + class_desc->add_text(cd.properties[i].getter + "()"); + } class_desc->pop(); //color class_desc->push_color(comment_color); class_desc->add_text(" getter"); @@ -1627,12 +1664,14 @@ FindBar::FindBar() { add_child(matches_label); matches_label->hide(); - find_prev = memnew(ToolButton); + find_prev = memnew(Button); + find_prev->set_flat(true); add_child(find_prev); find_prev->set_focus_mode(FOCUS_NONE); find_prev->connect("pressed", callable_mp(this, &FindBar::search_prev)); - find_next = memnew(ToolButton); + find_next = memnew(Button); + find_next->set_flat(true); add_child(find_next); find_next->set_focus_mode(FOCUS_NONE); find_next->connect("pressed", callable_mp(this, &FindBar::search_next)); diff --git a/editor/editor_help.h b/editor/editor_help.h index 4d42c1d38a..7c3edeb299 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -47,8 +47,8 @@ class FindBar : public HBoxContainer { GDCLASS(FindBar, HBoxContainer); LineEdit *search_text; - ToolButton *find_prev; - ToolButton *find_next; + Button *find_prev; + Button *find_next; Label *matches_label; TextureButton *hide_button; String prev_search; diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 5bfcbf06fc..d2b9405552 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -201,14 +201,16 @@ EditorHelpSearch::EditorHelpSearch() { register_text_enter(search_box); hbox->add_child(search_box); - case_sensitive_button = memnew(ToolButton); + case_sensitive_button = memnew(Button); + case_sensitive_button->set_flat(true); case_sensitive_button->set_tooltip(TTR("Case Sensitive")); case_sensitive_button->connect("pressed", callable_mp(this, &EditorHelpSearch::_update_results)); case_sensitive_button->set_toggle_mode(true); case_sensitive_button->set_focus_mode(Control::FOCUS_NONE); hbox->add_child(case_sensitive_button); - hierarchy_button = memnew(ToolButton); + hierarchy_button = memnew(Button); + hierarchy_button->set_flat(true); hierarchy_button->set_tooltip(TTR("Show Hierarchy")); hierarchy_button->connect("pressed", callable_mp(this, &EditorHelpSearch::_update_results)); hierarchy_button->set_toggle_mode(true); diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h index f7dbc5c3ad..b37f74fd7e 100644 --- a/editor/editor_help_search.h +++ b/editor/editor_help_search.h @@ -54,8 +54,8 @@ class EditorHelpSearch : public ConfirmationDialog { }; LineEdit *search_box; - ToolButton *case_sensitive_button; - ToolButton *hierarchy_button; + Button *case_sensitive_button; + Button *hierarchy_button; OptionButton *filter_combo; Tree *results_tree; bool old_search; diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index ea5f73acd1..9595eb8a72 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -124,7 +124,7 @@ void EditorLog::add_message(const String &p_msg, MessageType p_type) { } } -void EditorLog::set_tool_button(ToolButton *p_tool_button) { +void EditorLog::set_tool_button(Button *p_tool_button) { tool_button = p_tool_button; } diff --git a/editor/editor_log.h b/editor/editor_log.h index 1c9a2d4062..3bf5615346 100644 --- a/editor/editor_log.h +++ b/editor/editor_log.h @@ -31,17 +31,16 @@ #ifndef EDITOR_LOG_H #define EDITOR_LOG_H -#include "scene/gui/control.h" -#include "scene/gui/label.h" -#include "scene/gui/rich_text_label.h" -#include "scene/gui/texture_button.h" -//#include "scene/gui/empty_control.h" #include "core/os/thread.h" #include "pane_drag.h" #include "scene/gui/box_container.h" +#include "scene/gui/button.h" +#include "scene/gui/control.h" +#include "scene/gui/label.h" #include "scene/gui/panel_container.h" +#include "scene/gui/rich_text_label.h" +#include "scene/gui/texture_button.h" #include "scene/gui/texture_rect.h" -#include "scene/gui/tool_button.h" class EditorLog : public VBoxContainer { GDCLASS(EditorLog, VBoxContainer); @@ -52,7 +51,7 @@ class EditorLog : public VBoxContainer { RichTextLabel *log; HBoxContainer *title_hb; //PaneDrag *pd; - ToolButton *tool_button; + Button *tool_button; static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type); @@ -78,7 +77,7 @@ public: }; void add_message(const String &p_msg, MessageType p_type = MSG_TYPE_STD); - void set_tool_button(ToolButton *p_tool_button); + void set_tool_button(Button *p_tool_button); void deinit(); void clear(); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 9a9a1bfdeb..d8bc555d6d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -58,7 +58,6 @@ #include "scene/gui/tab_container.h" #include "scene/gui/tabs.h" #include "scene/gui/texture_progress.h" -#include "scene/gui/tool_button.h" #include "scene/resources/packed_scene.h" #include "servers/navigation_server_2d.h" #include "servers/navigation_server_3d.h" @@ -485,7 +484,7 @@ void EditorNode::_notification(int p_what) { // update_icons for (int i = 0; i < singleton->main_editor_buttons.size(); i++) { - ToolButton *tb = singleton->main_editor_buttons[i]; + Button *tb = singleton->main_editor_buttons[i]; EditorPlugin *p_editor = singleton->editor_table[i]; Ref<Texture2D> icon = p_editor->get_icon(); @@ -2776,7 +2775,8 @@ void EditorNode::select_editor_by_name(const String &p_name) { void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed) { if (p_editor->has_main_screen()) { - ToolButton *tb = memnew(ToolButton); + Button *tb = memnew(Button); + tb->set_flat(true); tb->set_toggle_mode(true); tb->connect("pressed", callable_mp(singleton, &EditorNode::_editor_select), varray(singleton->main_editor_buttons.size())); tb->set_text(p_editor->get_name()); @@ -3642,17 +3642,12 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p } if (ScriptServer::is_global_class(p_class)) { - String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(p_class); - Ref<ImageTexture> icon = _load_custom_class_icon(icon_path); - if (icon.is_valid()) { - return icon; - } - - Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(p_class), "Script"); + Ref<ImageTexture> icon; + Ref<Script> script = EditorNode::get_editor_data().script_class_load_script(p_class); while (script.is_valid()) { - String current_icon_path; - script->get_language()->get_global_class_name(script->get_path(), nullptr, ¤t_icon_path); + StringName name = EditorNode::get_editor_data().script_class_get_name(script->get_path()); + String current_icon_path = EditorNode::get_editor_data().script_class_get_icon_path(name); icon = _load_custom_class_icon(current_icon_path); if (icon.is_valid()) { return icon; @@ -4621,8 +4616,9 @@ void EditorNode::_scene_tab_changed(int p_tab) { editor_data.get_undo_redo().commit_action(); } -ToolButton *EditorNode::add_bottom_panel_item(String p_text, Control *p_item) { - ToolButton *tb = memnew(ToolButton); +Button *EditorNode::add_bottom_panel_item(String p_text, Control *p_item) { + Button *tb = memnew(Button); + tb->set_flat(true); tb->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch), varray(bottom_panel_items.size())); tb->set_text(p_text); tb->set_toggle_mode(true); @@ -5698,7 +5694,8 @@ EditorNode::EditorNode() { dock_select_popup->add_child(dock_vb); HBoxContainer *dock_hb = memnew(HBoxContainer); - dock_tab_move_left = memnew(ToolButton); + dock_tab_move_left = memnew(Button); + dock_tab_move_left->set_flat(true); dock_tab_move_left->set_icon(theme->get_icon("Back", "EditorIcons")); dock_tab_move_left->set_focus_mode(Control::FOCUS_NONE); dock_tab_move_left->connect("pressed", callable_mp(this, &EditorNode::_dock_move_left)); @@ -5710,7 +5707,8 @@ EditorNode::EditorNode() { dock_label->set_align(Label::ALIGN_CENTER); dock_hb->add_child(dock_label); - dock_tab_move_right = memnew(ToolButton); + dock_tab_move_right = memnew(Button); + dock_tab_move_right->set_flat(true); dock_tab_move_right->set_icon(theme->get_icon("Forward", "EditorIcons")); dock_tab_move_right->set_focus_mode(Control::FOCUS_NONE); dock_tab_move_right->connect("pressed", callable_mp(this, &EditorNode::_dock_move_right)); @@ -5804,7 +5802,8 @@ EditorNode::EditorNode() { srt->add_child(tabbar_container); tabbar_container->add_child(scene_tabs); - distraction_free = memnew(ToolButton); + distraction_free = memnew(Button); + distraction_free->set_flat(true); #ifdef OSX_ENABLED distraction_free->set_shortcut(ED_SHORTCUT("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_CTRL | KEY_D)); #else @@ -5815,7 +5814,8 @@ EditorNode::EditorNode() { distraction_free->set_icon(gui_base->get_theme_icon("DistractionFree", "EditorIcons")); distraction_free->set_toggle_mode(true); - scene_tab_add = memnew(ToolButton); + scene_tab_add = memnew(Button); + scene_tab_add->set_flat(true); tabbar_container->add_child(scene_tab_add); tabbar_container->add_child(distraction_free); scene_tab_add->set_tooltip(TTR("Add a new scene.")); @@ -5852,7 +5852,8 @@ EditorNode::EditorNode() { file_menu->add_theme_style_override("hover", gui_base->get_theme_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(file_menu); - prev_scene = memnew(ToolButton); + prev_scene = memnew(Button); + prev_scene->set_flat(true); prev_scene->set_icon(gui_base->get_theme_icon("PrevScene", "EditorIcons")); prev_scene->set_tooltip(TTR("Go to previously opened scene.")); prev_scene->set_disabled(true); @@ -6081,7 +6082,8 @@ EditorNode::EditorNode() { HBoxContainer *play_hb = memnew(HBoxContainer); menu_hb->add_child(play_hb); - play_button = memnew(ToolButton); + play_button = memnew(Button); + play_button->set_flat(true); play_hb->add_child(play_button); play_button->set_toggle_mode(true); play_button->set_icon(gui_base->get_theme_icon("MainPlay", "EditorIcons")); @@ -6094,7 +6096,8 @@ EditorNode::EditorNode() { play_button->set_shortcut(ED_SHORTCUT("editor/play", TTR("Play"), KEY_F5)); #endif - pause_button = memnew(ToolButton); + pause_button = memnew(Button); + pause_button->set_flat(true); pause_button->set_toggle_mode(true); pause_button->set_icon(gui_base->get_theme_icon("Pause", "EditorIcons")); pause_button->set_focus_mode(Control::FOCUS_NONE); @@ -6107,7 +6110,8 @@ EditorNode::EditorNode() { pause_button->set_shortcut(ED_SHORTCUT("editor/pause_scene", TTR("Pause Scene"), KEY_F7)); #endif - stop_button = memnew(ToolButton); + stop_button = memnew(Button); + stop_button->set_flat(true); play_hb->add_child(stop_button); stop_button->set_focus_mode(Control::FOCUS_NONE); stop_button->set_icon(gui_base->get_theme_icon("Stop", "EditorIcons")); @@ -6124,7 +6128,8 @@ EditorNode::EditorNode() { play_hb->add_child(run_native); run_native->connect("native_run", callable_mp(this, &EditorNode::_run_native)); - play_scene_button = memnew(ToolButton); + play_scene_button = memnew(Button); + play_scene_button->set_flat(true); play_hb->add_child(play_scene_button); play_scene_button->set_toggle_mode(true); play_scene_button->set_focus_mode(Control::FOCUS_NONE); @@ -6137,7 +6142,8 @@ EditorNode::EditorNode() { play_scene_button->set_shortcut(ED_SHORTCUT("editor/play_scene", TTR("Play Scene"), KEY_F6)); #endif - play_custom_scene_button = memnew(ToolButton); + play_custom_scene_button = memnew(Button); + play_custom_scene_button->set_flat(true); play_hb->add_child(play_custom_scene_button); play_custom_scene_button->set_toggle_mode(true); play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE); @@ -6298,7 +6304,8 @@ EditorNode::EditorNode() { version_label->set_self_modulate(Color(1, 1, 1, 0.6)); bottom_panel_hb->add_child(version_label); - bottom_panel_raise = memnew(ToolButton); + bottom_panel_raise = memnew(Button); + bottom_panel_raise->set_flat(true); bottom_panel_raise->set_icon(gui_base->get_theme_icon("ExpandBottomDock", "EditorIcons")); bottom_panel_raise->set_shortcut(ED_SHORTCUT("editor/bottom_panel_expand", TTR("Expand Bottom Panel"), KEY_MASK_SHIFT | KEY_F12)); @@ -6309,7 +6316,7 @@ EditorNode::EditorNode() { bottom_panel_raise->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_raise_toggled)); log = memnew(EditorLog); - ToolButton *output_button = add_bottom_panel_item(TTR("Output"), log); + Button *output_button = add_bottom_panel_item(TTR("Output"), log); log->set_tool_button(output_button); old_split_ofs = 0; diff --git a/editor/editor_node.h b/editor/editor_node.h index 7c9cf44d6c..b0e0c5614c 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -83,7 +83,7 @@ class ScriptCreateDialog; class TabContainer; class Tabs; class TextureProgress; -class ToolButton; +class Button; class VSplitContainer; class Window; class SubViewport; @@ -265,15 +265,15 @@ private: MenuButton *settings_menu; MenuButton *help_menu; PopupMenu *tool_menu; - ToolButton *export_button; - ToolButton *prev_scene; - ToolButton *play_button; - ToolButton *pause_button; - ToolButton *stop_button; - ToolButton *run_settings_button; - ToolButton *play_scene_button; - ToolButton *play_custom_scene_button; - ToolButton *search_button; + Button *export_button; + Button *prev_scene; + Button *play_button; + Button *pause_button; + Button *stop_button; + Button *run_settings_button; + Button *play_scene_button; + Button *play_custom_scene_button; + Button *search_button; TextureProgress *audio_vu; Timer *screenshot_timer; @@ -336,7 +336,7 @@ private: EditorQuickOpen *quick_run; HBoxContainer *main_editor_button_vb; - Vector<ToolButton *> main_editor_buttons; + Vector<Button *> main_editor_buttons; Vector<EditorPlugin *> editor_table; AudioStreamPreviewGenerator *preview_gen; @@ -358,15 +358,15 @@ private: PopupPanel *dock_select_popup; Control *dock_select; Button *dock_float; - ToolButton *dock_tab_move_left; - ToolButton *dock_tab_move_right; + Button *dock_tab_move_left; + Button *dock_tab_move_right; int dock_popup_selected; Timer *dock_drag_timer; bool docks_visible; HBoxContainer *tabbar_container; - ToolButton *distraction_free; - ToolButton *scene_tab_add; + Button *distraction_free; + Button *scene_tab_add; bool scene_distraction; bool script_distraction; @@ -412,7 +412,7 @@ private: struct BottomPanelItem { String name; Control *control; - ToolButton *button; + Button *button; }; Vector<BottomPanelItem> bottom_panel_items; @@ -422,7 +422,7 @@ private: HBoxContainer *bottom_panel_hb_editors; VBoxContainer *bottom_panel_vb; Label *version_label; - ToolButton *bottom_panel_raise; + Button *bottom_panel_raise; void _bottom_panel_raise_toggled(bool); @@ -821,9 +821,9 @@ public: bool is_exiting() const { return exiting; } - ToolButton *get_pause_button() { return pause_button; } + Button *get_pause_button() { return pause_button; } - ToolButton *add_bottom_panel_item(String p_text, Control *p_item); + Button *add_bottom_panel_item(String p_text, Control *p_item); bool are_bottom_panels_hidden() const; void make_bottom_panel_item_visible(Control *p_item); void raise_bottom_panel_item(Control *p_item); diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 6d93e92555..32b799cd61 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -332,7 +332,7 @@ void EditorPlugin::remove_autoload_singleton(const String &p_name) { EditorNode::get_singleton()->get_project_settings()->get_autoload_settings()->autoload_remove(p_name); } -ToolButton *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) { +Button *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) { ERR_FAIL_NULL_V(p_control, nullptr); return EditorNode::get_singleton()->add_bottom_panel_item(p_title, p_control); } diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index aac36bfdfd..e84984d57a 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -37,7 +37,6 @@ #include "editor/import/editor_import_plugin.h" #include "editor/import/resource_importer_scene.h" #include "editor/script_create_dialog.h" -#include "scene/gui/tool_button.h" #include "scene/main/node.h" #include "scene/resources/texture.h" @@ -161,7 +160,7 @@ public: void add_control_to_container(CustomControlContainer p_location, Control *p_control); void remove_control_from_container(CustomControlContainer p_location, Control *p_control); - ToolButton *add_control_to_bottom_panel(Control *p_control, const String &p_title); + Button *add_control_to_bottom_panel(Control *p_control, const String &p_title); void add_control_to_dock(DockSlot p_slot, Control *p_control); void remove_control_from_docks(Control *p_control); void remove_control_from_bottom_panel(Control *p_control); diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index cfa0c7a063..eee610e9a8 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -164,7 +164,8 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() { add_focusable(text); hb->add_child(text); text->set_h_size_flags(SIZE_EXPAND_FILL); - open_big_text = memnew(ToolButton); + open_big_text = memnew(Button); + open_big_text->set_flat(true); open_big_text->connect("pressed", callable_mp(this, &EditorPropertyMultilineText::_open_big_text)); hb->add_child(open_big_text); big_text_dialog = nullptr; @@ -1283,14 +1284,25 @@ void EditorPropertyVector3::_value_changed(double val, const String &p_name) { } void EditorPropertyVector3::update_property() { - Vector3 val = get_edited_object()->get(get_edited_property()); + update_using_vector(get_edited_object()->get(get_edited_property())); +} + +void EditorPropertyVector3::update_using_vector(Vector3 p_vector) { setting = true; - spin[0]->set_value(val.x); - spin[1]->set_value(val.y); - spin[2]->set_value(val.z); + spin[0]->set_value(p_vector.x); + spin[1]->set_value(p_vector.y); + spin[2]->set_value(p_vector.z); setting = false; } +Vector3 EditorPropertyVector3::get_vector() { + Vector3 v3; + v3.x = spin[0]->get_value(); + v3.y = spin[1]->get_value(); + v3.z = spin[2]->get_value(); + return v3; +} + void EditorPropertyVector3::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); @@ -1434,7 +1446,7 @@ EditorPropertyVector2i::EditorPropertyVector2i(bool p_force_wide) { setting = false; } -///////////////////// RECT2 ///////////////////////// +///////////////////// RECT2i ///////////////////////// void EditorPropertyRect2i::_value_changed(double val, const String &p_name) { if (setting) { @@ -1520,7 +1532,7 @@ EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) { setting = false; } -///////////////////// VECTOR3 ///////////////////////// +///////////////////// VECTOR3i ///////////////////////// void EditorPropertyVector3i::_value_changed(double val, const String &p_name) { if (setting) { @@ -2029,21 +2041,23 @@ void EditorPropertyTransform::_value_changed(double val, const String &p_name) { } void EditorPropertyTransform::update_property() { - Transform val = get_edited_object()->get(get_edited_property()); - setting = true; - spin[0]->set_value(val.basis[0][0]); - spin[1]->set_value(val.basis[1][0]); - spin[2]->set_value(val.basis[2][0]); - spin[3]->set_value(val.basis[0][1]); - spin[4]->set_value(val.basis[1][1]); - spin[5]->set_value(val.basis[2][1]); - spin[6]->set_value(val.basis[0][2]); - spin[7]->set_value(val.basis[1][2]); - spin[8]->set_value(val.basis[2][2]); - spin[9]->set_value(val.origin[0]); - spin[10]->set_value(val.origin[1]); - spin[11]->set_value(val.origin[2]); + update_using_transform(get_edited_object()->get(get_edited_property())); +} +void EditorPropertyTransform::update_using_transform(Transform p_transform) { + setting = true; + spin[0]->set_value(p_transform.basis[0][0]); + spin[1]->set_value(p_transform.basis[1][0]); + spin[2]->set_value(p_transform.basis[2][0]); + spin[3]->set_value(p_transform.basis[0][1]); + spin[4]->set_value(p_transform.basis[1][1]); + spin[5]->set_value(p_transform.basis[2][1]); + spin[6]->set_value(p_transform.basis[0][2]); + spin[7]->set_value(p_transform.basis[1][2]); + spin[8]->set_value(p_transform.basis[2][2]); + spin[9]->set_value(p_transform.origin[0]); + spin[10]->set_value(p_transform.origin[1]); + spin[11]->set_value(p_transform.origin[2]); setting = false; } diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 61c11f4534..35e6c10d90 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -392,6 +392,8 @@ protected: public: virtual void update_property(); + virtual void update_using_vector(Vector3 p_vector); + virtual Vector3 get_vector(); void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyVector3(bool p_force_wide = false); }; @@ -536,6 +538,7 @@ protected: public: virtual void update_property(); + virtual void update_using_transform(Transform p_transform); void setup(double p_min, double p_max, double p_step, bool p_no_slider); EditorPropertyTransform(); }; diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index ace106cd3e..a93763810b 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -570,17 +570,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("focus", "PopupMenu", style_menu); theme->set_stylebox("disabled", "PopupMenu", style_menu); - theme->set_stylebox("normal", "ToolButton", style_menu); - theme->set_stylebox("hover", "ToolButton", style_menu); - theme->set_stylebox("pressed", "ToolButton", style_menu); - theme->set_stylebox("focus", "ToolButton", style_menu); - theme->set_stylebox("disabled", "ToolButton", style_menu); - theme->set_color("font_color", "MenuButton", font_color); theme->set_color("font_color_hover", "MenuButton", font_color_hl); - theme->set_color("font_color", "ToolButton", font_color); - theme->set_color("font_color_hover", "ToolButton", font_color_hl); - theme->set_color("font_color_pressed", "ToolButton", accent_color); theme->set_stylebox("MenuHover", "EditorStyles", style_menu_hover_border); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 4fdc3dc080..c700fdccad 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -2085,7 +2085,32 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data, } } if (!to_move.empty()) { - _move_operation_confirm(to_dir); + if (Input::get_singleton()->is_key_pressed(KEY_CONTROL)) { + for (int i = 0; i < to_move.size(); i++) { + String new_path; + String new_path_base; + + if (to_move[i].is_file) { + new_path = to_dir.plus_file(to_move[i].path.get_file()); + new_path_base = new_path.get_basename() + " (%d)." + new_path.get_extension(); + } else { + PackedStringArray path_split = to_move[i].path.split("/"); + new_path = to_dir.plus_file(path_split[path_split.size() - 2]); + new_path_base = new_path + " (%d)"; + } + + int exist_counter = 1; + DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES); + while (da->file_exists(new_path) || da->dir_exists(new_path)) { + exist_counter++; + new_path = vformat(new_path_base, exist_counter); + } + _try_duplicate_item(to_move[i], new_path); + } + _rescan(); + } else { + _move_operation_confirm(to_dir); + } } } else if (favorite) { // Add the files from favorites. @@ -2518,13 +2543,15 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { toolbar_hbc->add_theme_constant_override("separation", 0); top_vbc->add_child(toolbar_hbc); - button_hist_prev = memnew(ToolButton); + button_hist_prev = memnew(Button); + button_hist_prev->set_flat(true); button_hist_prev->set_disabled(true); button_hist_prev->set_focus_mode(FOCUS_NONE); button_hist_prev->set_tooltip(TTR("Previous Folder/File")); toolbar_hbc->add_child(button_hist_prev); - button_hist_next = memnew(ToolButton); + button_hist_next = memnew(Button); + button_hist_next->set_flat(true); button_hist_next->set_disabled(true); button_hist_next->set_focus_mode(FOCUS_NONE); button_hist_next->set_tooltip(TTR("Next Folder/File")); @@ -2602,7 +2629,8 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { file_list_search_box->connect("text_changed", callable_mp(this, &FileSystemDock::_search_changed), varray(file_list_search_box)); path_hb->add_child(file_list_search_box); - button_file_list_display_mode = memnew(ToolButton); + button_file_list_display_mode = memnew(Button); + button_file_list_display_mode->set_flat(true); path_hb->add_child(button_file_list_display_mode); files = memnew(ItemList); diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index 08c2124ae8..b0118f11aa 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -40,7 +40,6 @@ #include "scene/gui/option_button.h" #include "scene/gui/progress_bar.h" #include "scene/gui/split_container.h" -#include "scene/gui/tool_button.h" #include "scene/gui/tree.h" #include "scene/main/timer.h" diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 1bc0de1ab0..53c52b94cc 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -719,22 +719,20 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin // Do this first because it resets properties of the cell... item->set_cell_mode(text_index, TreeItem::CELL_MODE_CUSTOM); - String item_text = vformat("%3s: %s", line_number, text.replace("\t", " ")); + // Trim result item line + int old_text_size = text.size(); + text = text.strip_edges(true, false); + int chars_removed = old_text_size - text.size(); + String start = vformat("%3s: ", line_number); - item->set_text(text_index, item_text); + item->set_text(text_index, start + text); item->set_custom_draw(text_index, this, "_draw_result_text"); - Ref<Font> font = _results_display->get_theme_font("font"); - - float raw_text_width = font->get_string_size(text).x; - float item_text_width = font->get_string_size(item_text).x; - Result r; r.line_number = line_number; r.begin = begin; r.end = end; - r.draw_begin = (item_text_width - raw_text_width) + font->get_string_size(text.left(r.begin)).x; - r.draw_width = font->get_string_size(text.substr(r.begin, r.end - r.begin)).x; + r.begin_trimmed = begin - chars_removed + start.size() - 1; _result_items[item] = r; if (_with_replace) { @@ -755,10 +753,12 @@ void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) { return; } Result r = E->value(); + String item_text = item->get_text(_with_replace ? 1 : 0); + Ref<Font> font = _results_display->get_theme_font("font"); Rect2 match_rect = rect; - match_rect.position.x += r.draw_begin; - match_rect.size.x = r.draw_width; + match_rect.position.x += font->get_string_size(item_text.left(r.begin_trimmed)).x; + match_rect.size.x = font->get_string_size(_search_text_label->get_text()).x; match_rect.position.y += 1 * EDSCALE; match_rect.size.y -= 2 * EDSCALE; diff --git a/editor/find_in_files.h b/editor/find_in_files.h index 41adb156b6..9815296be8 100644 --- a/editor/find_in_files.h +++ b/editor/find_in_files.h @@ -191,8 +191,7 @@ private: int line_number; int begin; int end; - float draw_begin; - float draw_width; + int begin_trimmed; }; void apply_replaces_in_file(String fpath, const Vector<Result> &locations, String new_text); diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp index 98b216acda..4e6e2d0237 100644 --- a/editor/groups_editor.cpp +++ b/editor/groups_editor.cpp @@ -477,7 +477,8 @@ GroupDialog::GroupDialog() { vbc_buttons->set_h_size_flags(Control::SIZE_SHRINK_CENTER); vbc_buttons->set_v_size_flags(Control::SIZE_SHRINK_CENTER); - add_button = memnew(ToolButton); + add_button = memnew(Button); + add_button->set_flat(true); add_button->set_text(TTR("Add")); add_button->connect("pressed", callable_mp(this, &GroupDialog::_add_pressed)); @@ -486,7 +487,8 @@ GroupDialog::GroupDialog() { vbc_buttons->add_spacer(); vbc_buttons->add_spacer(); - remove_button = memnew(ToolButton); + remove_button = memnew(Button); + remove_button->set_flat(true); remove_button->set_text(TTR("Remove")); remove_button->connect("pressed", callable_mp(this, &GroupDialog::_removed_pressed)); diff --git a/editor/groups_editor.h b/editor/groups_editor.h index 911c82e7f0..d5daaa19eb 100644 --- a/editor/groups_editor.h +++ b/editor/groups_editor.h @@ -38,7 +38,6 @@ #include "scene/gui/item_list.h" #include "scene/gui/line_edit.h" #include "scene/gui/popup.h" -#include "scene/gui/tool_button.h" #include "scene/gui/tree.h" class GroupDialog : public AcceptDialog { @@ -63,8 +62,8 @@ class GroupDialog : public AcceptDialog { Label *group_empty; - ToolButton *add_button; - ToolButton *remove_button; + Button *add_button; + Button *remove_button; String selected_group; diff --git a/editor/icons/AssetLib.svg b/editor/icons/AssetLib.svg index 72b20ec047..22307efde3 100644 --- a/editor/icons/AssetLib.svg +++ b/editor/icons/AssetLib.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-1.6569 0-3 1.3431-3 3v2h-3c-.66446.0003505-1.1438.6366-.96094 1.2754l2 7c.12287.42881.51487.7244.96094.72461h8c.44606-.000209.83806-.2958.96094-.72461l2-7c.1829-.63879-.29648-1.275-.96094-1.2754h-3v-2c0-1.6569-1.3431-3-3-3zm0 2c.55228 0 1 .44772 1 1v2h-2v-2c0-.55228.44772-1 1-1z" fill="#e0e0e0"/></svg>
\ No newline at end of file +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#e0e0e0" stroke-linejoin="round" stroke-width="2"><path d="m8 1v9l4-4"/><path d="m8 10-4-4"/><path d="m2 10v4h12v-4" stroke-linecap="round"/></g></svg> diff --git a/editor/icons/Crosshair.svg b/editor/icons/Crosshair.svg deleted file mode 100644 index b6fa5ec654..0000000000 --- a/editor/icons/Crosshair.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1v5h-5v1 3h5v5h4v-5h5v-4h-5v-5z" fill-opacity=".627451"/><path d="m2 7v2l5.0000803.0000197-.0000803 4.9999803h2l-.0000803-4.9999803 5.0000803-.0000197v-2l-5.0000803.0001803.0000803-5.0001803h-2l.0000803 5.0001803z" fill="#fefefe" fill-opacity=".862745"/></svg>
\ No newline at end of file diff --git a/editor/icons/ToolButton.svg b/editor/icons/ToolButton.svg deleted file mode 100644 index 98a41d2a08..0000000000 --- a/editor/icons/ToolButton.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11 1.1738c-1.1979.4235-1.999 1.5557-2 2.8262.0009552 1.2705.80214 2.4027 2 2.8262v7.1738c0 .554.446 1 1 1s1-.446 1-1v-7.1758c1.1972-.4232 1.9982-1.5544 2-2.8242-.0018-1.2698-.80282-2.401-2-2.8242v2.8242c0 .5523-.44772 1-1 1s-1-.4477-1-1zm-7 1.8262v3.1328l-1.4453-.96484-1.1094 1.6641 3 2c.3359.22389.77347.22389 1.1094 0l3-2-1.1094-1.6641-1.4453.96484v-3.1328zm-.5 8c-.831 0-1.5.669-1.5 1.5v.5h-1v2h8v-2h-1v-.5c0-.831-.669-1.5-1.5-1.5z" fill="#a5efac"/></svg>
\ No newline at end of file diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 1a232658fe..683db0e31d 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -2877,6 +2877,7 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye int track_idx = animation->get_track_count(); animation->add_track(Animation::TYPE_TRANSFORM); animation->track_set_path(track_idx, node_path); + animation->track_set_imported(track_idx, true); //first determine animation length const float increment = 1.0 / float(bake_fps); diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index ec82f78e75..65ebf9dc4f 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -943,9 +943,9 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String ERR_CONTINUE(anim.is_null()); if (!p_animations.has(anim)) { - //mark what comes from the file first, this helps eventually keep user data + // We are making external files so they are modifiable for (int i = 0; i < anim->get_track_count(); i++) { - anim->track_set_imported(i, true); + anim->track_set_imported(i, false); } String ext_name; diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 2b26851140..903d9a2d31 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -493,14 +493,16 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { HBoxContainer *general_options_hb = memnew(HBoxContainer); add_child(general_options_hb); - resource_new_button = memnew(ToolButton); + resource_new_button = memnew(Button); + resource_new_button->set_flat(true); resource_new_button->set_tooltip(TTR("Create a new resource in memory and edit it.")); resource_new_button->set_icon(get_theme_icon("New", "EditorIcons")); general_options_hb->add_child(resource_new_button); resource_new_button->connect("pressed", callable_mp(this, &InspectorDock::_new_resource)); resource_new_button->set_focus_mode(Control::FOCUS_NONE); - resource_load_button = memnew(ToolButton); + resource_load_button = memnew(Button); + resource_load_button->set_flat(true); resource_load_button->set_tooltip(TTR("Load an existing resource from disk and edit it.")); resource_load_button->set_icon(get_theme_icon("Load", "EditorIcons")); general_options_hb->add_child(resource_load_button); @@ -519,7 +521,8 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { general_options_hb->add_spacer(); - backward_button = memnew(ToolButton); + backward_button = memnew(Button); + backward_button->set_flat(true); general_options_hb->add_child(backward_button); backward_button->set_icon(get_theme_icon("Back", "EditorIcons")); backward_button->set_flat(true); @@ -527,7 +530,8 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { backward_button->set_disabled(true); backward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_back)); - forward_button = memnew(ToolButton); + forward_button = memnew(Button); + forward_button->set_flat(true); general_options_hb->add_child(forward_button); forward_button->set_icon(get_theme_icon("Forward", "EditorIcons")); forward_button->set_flat(true); diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h index 2a99a7db45..551d3d1643 100644 --- a/editor/inspector_dock.h +++ b/editor/inspector_dock.h @@ -42,7 +42,6 @@ #include "scene/gui/control.h" #include "scene/gui/label.h" #include "scene/gui/popup_menu.h" -#include "scene/gui/tool_button.h" class EditorNode; @@ -74,13 +73,13 @@ class InspectorDock : public VBoxContainer { Object *current; - ToolButton *backward_button; - ToolButton *forward_button; + Button *backward_button; + Button *forward_button; EditorFileDialog *load_resource_dialog; CreateDialog *new_resource_dialog; - ToolButton *resource_new_button; - ToolButton *resource_load_button; + Button *resource_new_button; + Button *resource_load_button; MenuButton *resource_save_button; MenuButton *history_menu; LineEdit *search; diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp index 9b9cfad9eb..2c89517008 100644 --- a/editor/node_dock.cpp +++ b/editor/node_dock.cpp @@ -92,7 +92,8 @@ NodeDock::NodeDock() { add_child(mode_hb); mode_hb->hide(); - connections_button = memnew(ToolButton); + connections_button = memnew(Button); + connections_button->set_flat(true); connections_button->set_text(TTR("Signals")); connections_button->set_toggle_mode(true); connections_button->set_pressed(true); @@ -101,7 +102,8 @@ NodeDock::NodeDock() { mode_hb->add_child(connections_button); connections_button->connect("pressed", callable_mp(this, &NodeDock::show_connections)); - groups_button = memnew(ToolButton); + groups_button = memnew(Button); + groups_button->set_flat(true); groups_button->set_text(TTR("Groups")); groups_button->set_toggle_mode(true); groups_button->set_pressed(false); diff --git a/editor/node_dock.h b/editor/node_dock.h index c165974678..8e10db5eb3 100644 --- a/editor/node_dock.h +++ b/editor/node_dock.h @@ -37,8 +37,8 @@ class NodeDock : public VBoxContainer { GDCLASS(NodeDock, VBoxContainer); - ToolButton *connections_button; - ToolButton *groups_button; + Button *connections_button; + Button *groups_button; ConnectionsDock *connections; GroupsEditor *groups; diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index b905c8db12..e99ffe2b83 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -703,17 +703,20 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(EditorNode *p_editor, bool p_wi edge_point = PosVertex(); add_child(memnew(VSeparator)); - button_create = memnew(ToolButton); + button_create = memnew(Button); + button_create->set_flat(true); add_child(button_create); button_create->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_CREATE)); button_create->set_toggle_mode(true); - button_edit = memnew(ToolButton); + button_edit = memnew(Button); + button_edit->set_flat(true); add_child(button_edit); button_edit->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_EDIT)); button_edit->set_toggle_mode(true); - button_delete = memnew(ToolButton); + button_delete = memnew(Button); + button_delete->set_flat(true); add_child(button_delete); button_delete->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_DELETE)); button_delete->set_toggle_mode(true); diff --git a/editor/plugins/abstract_polygon_2d_editor.h b/editor/plugins/abstract_polygon_2d_editor.h index d5b3a916d1..b3a17f7660 100644 --- a/editor/plugins/abstract_polygon_2d_editor.h +++ b/editor/plugins/abstract_polygon_2d_editor.h @@ -34,16 +34,15 @@ #include "editor/editor_node.h" #include "editor/editor_plugin.h" #include "scene/2d/polygon_2d.h" -#include "scene/gui/tool_button.h" class CanvasItemEditor; class AbstractPolygon2DEditor : public HBoxContainer { GDCLASS(AbstractPolygon2DEditor, HBoxContainer); - ToolButton *button_create; - ToolButton *button_edit; - ToolButton *button_delete; + Button *button_create; + Button *button_edit; + Button *button_delete; struct Vertex { Vertex() {} diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp index 75eacf56ec..959301907c 100644 --- a/editor/plugins/animation_blend_space_1d_editor.cpp +++ b/editor/plugins/animation_blend_space_1d_editor.cpp @@ -595,7 +595,8 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { Ref<ButtonGroup> bg; bg.instance(); - tool_blend = memnew(ToolButton); + tool_blend = memnew(Button); + tool_blend->set_flat(true); tool_blend->set_toggle_mode(true); tool_blend->set_button_group(bg); top_hb->add_child(tool_blend); @@ -603,14 +604,16 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { tool_blend->set_tooltip(TTR("Set the blending position within the space")); tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(3)); - tool_select = memnew(ToolButton); + tool_select = memnew(Button); + tool_select->set_flat(true); tool_select->set_toggle_mode(true); tool_select->set_button_group(bg); top_hb->add_child(tool_select); tool_select->set_tooltip(TTR("Select and move points, create points with RMB.")); tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(0)); - tool_create = memnew(ToolButton); + tool_create = memnew(Button); + tool_create->set_flat(true); tool_create->set_toggle_mode(true); tool_create->set_button_group(bg); top_hb->add_child(tool_create); @@ -619,14 +622,16 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { tool_erase_sep = memnew(VSeparator); top_hb->add_child(tool_erase_sep); - tool_erase = memnew(ToolButton); + tool_erase = memnew(Button); + tool_erase->set_flat(true); top_hb->add_child(tool_erase); tool_erase->set_tooltip(TTR("Erase points.")); tool_erase->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_erase_selected)); top_hb->add_child(memnew(VSeparator)); - snap = memnew(ToolButton); + snap = memnew(Button); + snap->set_flat(true); snap->set_toggle_mode(true); top_hb->add_child(snap); snap->set_pressed(true); diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h index 8cfd6714ad..c319b648ba 100644 --- a/editor/plugins/animation_blend_space_1d_editor.h +++ b/editor/plugins/animation_blend_space_1d_editor.h @@ -47,15 +47,15 @@ class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin { Ref<AnimationNodeBlendSpace1D> blend_space; HBoxContainer *goto_parent_hb; - ToolButton *goto_parent; + Button *goto_parent; PanelContainer *panel; - ToolButton *tool_blend; - ToolButton *tool_select; - ToolButton *tool_create; + Button *tool_blend; + Button *tool_select; + Button *tool_create; VSeparator *tool_erase_sep; - ToolButton *tool_erase; - ToolButton *snap; + Button *tool_erase; + Button *snap; SpinBox *snap_value; LineEdit *label_value; diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp index a7d5c2207b..1ab114fc01 100644 --- a/editor/plugins/animation_blend_space_2d_editor.cpp +++ b/editor/plugins/animation_blend_space_2d_editor.cpp @@ -819,7 +819,8 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { Ref<ButtonGroup> bg; bg.instance(); - tool_blend = memnew(ToolButton); + tool_blend = memnew(Button); + tool_blend->set_flat(true); tool_blend->set_toggle_mode(true); tool_blend->set_button_group(bg); top_hb->add_child(tool_blend); @@ -827,21 +828,24 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { tool_blend->set_tooltip(TTR("Set the blending position within the space")); tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(3)); - tool_select = memnew(ToolButton); + tool_select = memnew(Button); + tool_select->set_flat(true); tool_select->set_toggle_mode(true); tool_select->set_button_group(bg); top_hb->add_child(tool_select); tool_select->set_tooltip(TTR("Select and move points, create points with RMB.")); tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(0)); - tool_create = memnew(ToolButton); + tool_create = memnew(Button); + tool_create->set_flat(true); tool_create->set_toggle_mode(true); tool_create->set_button_group(bg); top_hb->add_child(tool_create); tool_create->set_tooltip(TTR("Create points.")); tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(1)); - tool_triangle = memnew(ToolButton); + tool_triangle = memnew(Button); + tool_triangle->set_flat(true); tool_triangle->set_toggle_mode(true); tool_triangle->set_button_group(bg); top_hb->add_child(tool_triangle); @@ -850,7 +854,8 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { tool_erase_sep = memnew(VSeparator); top_hb->add_child(tool_erase_sep); - tool_erase = memnew(ToolButton); + tool_erase = memnew(Button); + tool_erase->set_flat(true); top_hb->add_child(tool_erase); tool_erase->set_tooltip(TTR("Erase points and triangles.")); tool_erase->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_erase_selected)); @@ -858,7 +863,8 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { top_hb->add_child(memnew(VSeparator)); - auto_triangles = memnew(ToolButton); + auto_triangles = memnew(Button); + auto_triangles->set_flat(true); top_hb->add_child(auto_triangles); auto_triangles->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled)); auto_triangles->set_toggle_mode(true); @@ -866,7 +872,8 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { top_hb->add_child(memnew(VSeparator)); - snap = memnew(ToolButton); + snap = memnew(Button); + snap->set_flat(true); snap->set_toggle_mode(true); top_hb->add_child(snap); snap->set_pressed(true); diff --git a/editor/plugins/animation_blend_space_2d_editor.h b/editor/plugins/animation_blend_space_2d_editor.h index b430a12297..659b96cefa 100644 --- a/editor/plugins/animation_blend_space_2d_editor.h +++ b/editor/plugins/animation_blend_space_2d_editor.h @@ -47,18 +47,18 @@ class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin { Ref<AnimationNodeBlendSpace2D> blend_space; PanelContainer *panel; - ToolButton *tool_blend; - ToolButton *tool_select; - ToolButton *tool_create; - ToolButton *tool_triangle; + Button *tool_blend; + Button *tool_select; + Button *tool_create; + Button *tool_triangle; VSeparator *tool_erase_sep; - ToolButton *tool_erase; - ToolButton *snap; + Button *tool_erase; + Button *snap; SpinBox *snap_x; SpinBox *snap_y; OptionButton *interpolation; - ToolButton *auto_triangles; + Button *auto_triangles; LineEdit *label_x; LineEdit *label_y; diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 1e0a9535e2..035526ca55 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -380,26 +380,25 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource) file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); } + String path; //file->set_current_path(current_path); if (p_resource->get_path() != "") { - file->set_current_path(p_resource->get_path()); + path = p_resource->get_path(); if (extensions.size()) { - String ext = p_resource->get_path().get_extension().to_lower(); - if (extensions.find(ext) == nullptr) { - file->set_current_path(p_resource->get_path().replacen("." + ext, "." + extensions.front()->get())); + if (extensions.find(p_resource->get_path().get_extension().to_lower()) == nullptr) { + path = p_resource->get_path().get_base_dir() + p_resource->get_name() + "." + extensions.front()->get(); } } } else { - String existing; if (extensions.size()) { if (p_resource->get_name() != "") { - existing = p_resource->get_name() + "." + extensions.front()->get().to_lower(); + path = p_resource->get_name() + "." + extensions.front()->get().to_lower(); } else { - existing = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower(); + path = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower(); } } - file->set_current_path(existing); } + file->set_current_path(path); file->popup_centered_ratio(); file->set_title(TTR("Save Resource As...")); current_option = RESOURCE_SAVE; @@ -1503,24 +1502,29 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay HBoxContainer *hb = memnew(HBoxContainer); add_child(hb); - play_bw_from = memnew(ToolButton); + play_bw_from = memnew(Button); + play_bw_from->set_flat(true); play_bw_from->set_tooltip(TTR("Play selected animation backwards from current pos. (A)")); hb->add_child(play_bw_from); - play_bw = memnew(ToolButton); + play_bw = memnew(Button); + play_bw->set_flat(true); play_bw->set_tooltip(TTR("Play selected animation backwards from end. (Shift+A)")); hb->add_child(play_bw); - stop = memnew(ToolButton); + stop = memnew(Button); + stop->set_flat(true); stop->set_toggle_mode(true); hb->add_child(stop); stop->set_tooltip(TTR("Stop animation playback. (S)")); - play = memnew(ToolButton); + play = memnew(Button); + play->set_flat(true); play->set_tooltip(TTR("Play selected animation from start. (Shift+D)")); hb->add_child(play); - play_from = memnew(ToolButton); + play_from = memnew(Button); + play_from->set_flat(true); play_from->set_tooltip(TTR("Play selected animation from current pos. (D)")); hb->add_child(play_from); @@ -1572,7 +1576,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay animation->set_tooltip(TTR("Display list of animations in player.")); animation->set_clip_text(true); - autoplay = memnew(ToolButton); + autoplay = memnew(Button); + autoplay->set_flat(true); hb->add_child(autoplay); autoplay->set_tooltip(TTR("Autoplay on Load")); @@ -1584,7 +1589,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay hb->add_child(memnew(VSeparator)); - onion_toggle = memnew(ToolButton); + onion_toggle = memnew(Button); + onion_toggle->set_flat(true); onion_toggle->set_toggle_mode(true); onion_toggle->set_tooltip(TTR("Enable Onion Skinning")); onion_toggle->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu), varray(ONION_SKINNING_ENABLE)); @@ -1609,7 +1615,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay hb->add_child(memnew(VSeparator)); - pin = memnew(ToolButton); + pin = memnew(Button); + pin->set_flat(true); pin->set_toggle_mode(true); pin->set_tooltip(TTR("Pin AnimationPlayer")); hb->add_child(pin); diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h index 18f2d3b25e..fe96deecf2 100644 --- a/editor/plugins/animation_player_editor_plugin.h +++ b/editor/plugins/animation_player_editor_plugin.h @@ -96,9 +96,9 @@ class AnimationPlayerEditor : public VBoxContainer { Button *autoplay; MenuButton *tool_anim; - ToolButton *onion_toggle; + Button *onion_toggle; MenuButton *onion_skinning; - ToolButton *pin; + Button *pin; SpinBox *frame; LineEdit *scale; LineEdit *name; diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index a435b1c482..0970608853 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1208,7 +1208,8 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { Ref<ButtonGroup> bg; bg.instance(); - tool_select = memnew(ToolButton); + tool_select = memnew(Button); + tool_select->set_flat(true); top_hb->add_child(tool_select); tool_select->set_toggle_mode(true); tool_select->set_button_group(bg); @@ -1216,14 +1217,16 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_select->set_tooltip(TTR("Select and move nodes.\nRMB to add new nodes.\nShift+LMB to create connections.")); tool_select->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED); - tool_create = memnew(ToolButton); + tool_create = memnew(Button); + tool_create->set_flat(true); top_hb->add_child(tool_create); tool_create->set_toggle_mode(true); tool_create->set_button_group(bg); tool_create->set_tooltip(TTR("Create new nodes.")); tool_create->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED); - tool_connect = memnew(ToolButton); + tool_connect = memnew(Button); + tool_connect->set_flat(true); top_hb->add_child(tool_connect); tool_connect->set_toggle_mode(true); tool_connect->set_button_group(bg); @@ -1233,7 +1236,8 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_erase_hb = memnew(HBoxContainer); top_hb->add_child(tool_erase_hb); tool_erase_hb->add_child(memnew(VSeparator)); - tool_erase = memnew(ToolButton); + tool_erase = memnew(Button); + tool_erase->set_flat(true); tool_erase->set_tooltip(TTR("Remove selected node or transition.")); tool_erase_hb->add_child(tool_erase); tool_erase->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected)); @@ -1241,13 +1245,15 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_erase_hb->add_child(memnew(VSeparator)); - tool_autoplay = memnew(ToolButton); + tool_autoplay = memnew(Button); + tool_autoplay->set_flat(true); tool_autoplay->set_tooltip(TTR("Toggle autoplay this animation on start, restart or seek to zero.")); tool_erase_hb->add_child(tool_autoplay); tool_autoplay->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_autoplay_selected)); tool_autoplay->set_disabled(true); - tool_end = memnew(ToolButton); + tool_end = memnew(Button); + tool_end->set_flat(true); tool_end->set_tooltip(TTR("Set the end animation. This is useful for sub-transitions.")); tool_erase_hb->add_child(tool_end); tool_end->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_end_selected)); diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h index 022c32ef48..c4caf2e52b 100644 --- a/editor/plugins/animation_state_machine_editor.h +++ b/editor/plugins/animation_state_machine_editor.h @@ -46,16 +46,16 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { Ref<AnimationNodeStateMachine> state_machine; - ToolButton *tool_select; - ToolButton *tool_create; - ToolButton *tool_connect; + Button *tool_select; + Button *tool_create; + Button *tool_connect; Popup *name_edit_popup; LineEdit *name_edit; HBoxContainer *tool_erase_hb; - ToolButton *tool_erase; - ToolButton *tool_autoplay; - ToolButton *tool_end; + Button *tool_erase; + Button *tool_autoplay; + Button *tool_end; OptionButton *transition_mode; OptionButton *play_mode; diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp index 3b7a9320f0..b0f65af245 100644 --- a/editor/plugins/audio_stream_editor_plugin.cpp +++ b/editor/plugins/audio_stream_editor_plugin.cpp @@ -220,12 +220,14 @@ AudioStreamEditor::AudioStreamEditor() { hbox->add_theme_constant_override("separation", 0); vbox->add_child(hbox); - _play_button = memnew(ToolButton); + _play_button = memnew(Button); + _play_button->set_flat(true); hbox->add_child(_play_button); _play_button->set_focus_mode(Control::FOCUS_NONE); _play_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_play)); - _stop_button = memnew(ToolButton); + _stop_button = memnew(Button); + _stop_button->set_flat(true); hbox->add_child(_stop_button); _stop_button->set_focus_mode(Control::FOCUS_NONE); _stop_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_stop)); diff --git a/editor/plugins/audio_stream_editor_plugin.h b/editor/plugins/audio_stream_editor_plugin.h index dd7caaa15e..de176aab49 100644 --- a/editor/plugins/audio_stream_editor_plugin.h +++ b/editor/plugins/audio_stream_editor_plugin.h @@ -47,8 +47,8 @@ class AudioStreamEditor : public ColorRect { Label *_current_label; Label *_duration_label; - ToolButton *_play_button; - ToolButton *_stop_button; + Button *_play_button; + Button *_stop_button; float _current; bool _dragging; diff --git a/editor/plugins/baked_lightmap_editor_plugin.cpp b/editor/plugins/baked_lightmap_editor_plugin.cpp index 8fbe1646f7..ee9feb7f74 100644 --- a/editor/plugins/baked_lightmap_editor_plugin.cpp +++ b/editor/plugins/baked_lightmap_editor_plugin.cpp @@ -117,7 +117,8 @@ void BakedLightmapEditorPlugin::_bind_methods() { BakedLightmapEditorPlugin::BakedLightmapEditorPlugin(EditorNode *p_node) { editor = p_node; - bake = memnew(ToolButton); + bake = memnew(Button); + bake->set_flat(true); bake->set_icon(editor->get_gui_base()->get_theme_icon("Bake", "EditorIcons")); bake->set_text(TTR("Bake Lightmaps")); bake->hide(); diff --git a/editor/plugins/baked_lightmap_editor_plugin.h b/editor/plugins/baked_lightmap_editor_plugin.h index 67fb368a86..54eb0f71ec 100644 --- a/editor/plugins/baked_lightmap_editor_plugin.h +++ b/editor/plugins/baked_lightmap_editor_plugin.h @@ -41,7 +41,7 @@ class BakedLightmapEditorPlugin : public EditorPlugin { BakedLightmap *lightmap; - ToolButton *bake; + Button *bake; EditorNode *editor; EditorFileDialog *file_dialog; diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 2f7080b1a5..bf698a5ceb 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1207,7 +1207,26 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bool p_already_accepted) { Ref<InputEventMouseButton> b = p_event; if (b.is_valid() && !p_already_accepted) { - bool pan_on_scroll = bool(EditorSettings::get_singleton()->get("editors/2d/scroll_to_pan")) && !b->get_control(); + const bool pan_on_scroll = bool(EditorSettings::get_singleton()->get("editors/2d/scroll_to_pan")) && !b->get_control(); + + if (pan_on_scroll) { + // Perform horizontal scrolling first so we can check for Shift being held. + if (b->is_pressed() && + (b->get_button_index() == BUTTON_WHEEL_LEFT || (b->get_shift() && b->get_button_index() == BUTTON_WHEEL_UP))) { + // Pan left + view_offset.x -= int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor(); + update_viewport(); + return true; + } + + if (b->is_pressed() && + (b->get_button_index() == BUTTON_WHEEL_RIGHT || (b->get_shift() && b->get_button_index() == BUTTON_WHEEL_DOWN))) { + // Pan right + view_offset.x += int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor(); + update_viewport(); + return true; + } + } if (b->is_pressed() && b->get_button_index() == BUTTON_WHEEL_DOWN) { // Scroll or pan down @@ -1239,24 +1258,6 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo return true; } - if (b->is_pressed() && b->get_button_index() == BUTTON_WHEEL_LEFT) { - // Pan left - if (pan_on_scroll) { - view_offset.x -= int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor(); - update_viewport(); - return true; - } - } - - if (b->is_pressed() && b->get_button_index() == BUTTON_WHEEL_RIGHT) { - // Pan right - if (pan_on_scroll) { - view_offset.x += int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor(); - update_viewport(); - return true; - } - } - if (!panning) { if (b->is_pressed() && (b->get_button_index() == BUTTON_MIDDLE || @@ -4447,7 +4448,7 @@ void CanvasItemEditor::_button_override_camera(bool p_pressed) { } void CanvasItemEditor::_button_tool_select(int p_index) { - ToolButton *tb[TOOL_MAX] = { select_button, list_select_button, move_button, scale_button, rotate_button, pivot_button, pan_button, ruler_button }; + Button *tb[TOOL_MAX] = { select_button, list_select_button, move_button, scale_button, rotate_button, pivot_button, pan_button, ruler_button }; for (int i = 0; i < TOOL_MAX; i++) { tb[i]->set_pressed(i == p_index); } @@ -5577,13 +5578,15 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { viewport->add_child(controls_vb); - zoom_minus = memnew(ToolButton); + zoom_minus = memnew(Button); + zoom_minus->set_flat(true); zoom_hb->add_child(zoom_minus); zoom_minus->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_zoom_minus)); zoom_minus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_minus", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS)); zoom_minus->set_focus_mode(FOCUS_NONE); - zoom_reset = memnew(ToolButton); + zoom_reset = memnew(Button); + zoom_reset->set_flat(true); zoom_hb->add_child(zoom_reset); zoom_reset->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_zoom_reset)); zoom_reset->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_reset", TTR("Zoom Reset"), KEY_MASK_CMD | KEY_0)); @@ -5592,7 +5595,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { // Prevent the button's size from changing when the text size changes zoom_reset->set_custom_minimum_size(Size2(75 * EDSCALE, 0)); - zoom_plus = memnew(ToolButton); + zoom_plus = memnew(Button); + zoom_plus->set_flat(true); zoom_hb->add_child(zoom_plus); zoom_plus->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_zoom_plus)); zoom_plus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_plus", TTR("Zoom In"), KEY_MASK_CMD | KEY_EQUAL)); // Usually direct access key for PLUS @@ -5600,7 +5604,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { updating_scroll = false; - select_button = memnew(ToolButton); + select_button = memnew(Button); + select_button->set_flat(true); hb->add_child(select_button); select_button->set_toggle_mode(true); select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_SELECT)); @@ -5610,21 +5615,24 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(memnew(VSeparator)); - move_button = memnew(ToolButton); + move_button = memnew(Button); + move_button->set_flat(true); hb->add_child(move_button); move_button->set_toggle_mode(true); move_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_MOVE)); move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), KEY_W)); move_button->set_tooltip(TTR("Move Mode")); - rotate_button = memnew(ToolButton); + rotate_button = memnew(Button); + rotate_button->set_flat(true); hb->add_child(rotate_button); rotate_button->set_toggle_mode(true); rotate_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_ROTATE)); rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), KEY_E)); rotate_button->set_tooltip(TTR("Rotate Mode")); - scale_button = memnew(ToolButton); + scale_button = memnew(Button); + scale_button->set_flat(true); hb->add_child(scale_button); scale_button->set_toggle_mode(true); scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_SCALE)); @@ -5633,26 +5641,30 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(memnew(VSeparator)); - list_select_button = memnew(ToolButton); + list_select_button = memnew(Button); + list_select_button->set_flat(true); hb->add_child(list_select_button); list_select_button->set_toggle_mode(true); list_select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_LIST_SELECT)); list_select_button->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode).")); - pivot_button = memnew(ToolButton); + pivot_button = memnew(Button); + pivot_button->set_flat(true); hb->add_child(pivot_button); pivot_button->set_toggle_mode(true); pivot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_EDIT_PIVOT)); pivot_button->set_tooltip(TTR("Click to change object's rotation pivot.")); - pan_button = memnew(ToolButton); + pan_button = memnew(Button); + pan_button->set_flat(true); hb->add_child(pan_button); pan_button->set_toggle_mode(true); pan_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_PAN)); pan_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/pan_mode", TTR("Pan Mode"), KEY_G)); pan_button->set_tooltip(TTR("Pan Mode")); - ruler_button = memnew(ToolButton); + ruler_button = memnew(Button); + ruler_button->set_flat(true); hb->add_child(ruler_button); ruler_button->set_toggle_mode(true); ruler_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_RULER)); @@ -5661,14 +5673,16 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(memnew(VSeparator)); - smart_snap_button = memnew(ToolButton); + smart_snap_button = memnew(Button); + smart_snap_button->set_flat(true); hb->add_child(smart_snap_button); smart_snap_button->set_toggle_mode(true); smart_snap_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_smart_snap)); smart_snap_button->set_tooltip(TTR("Toggle smart snapping.")); smart_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_smart_snap", TTR("Use Smart Snap"), KEY_MASK_SHIFT | KEY_S)); - grid_snap_button = memnew(ToolButton); + grid_snap_button = memnew(Button); + grid_snap_button->set_flat(true); hb->add_child(grid_snap_button); grid_snap_button->set_toggle_mode(true); grid_snap_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_grid_snap)); @@ -5707,23 +5721,27 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(memnew(VSeparator)); - lock_button = memnew(ToolButton); + lock_button = memnew(Button); + lock_button->set_flat(true); hb->add_child(lock_button); lock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(LOCK_SELECTED)); lock_button->set_tooltip(TTR("Lock the selected object in place (can't be moved).")); - unlock_button = memnew(ToolButton); + unlock_button = memnew(Button); + unlock_button->set_flat(true); hb->add_child(unlock_button); unlock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(UNLOCK_SELECTED)); unlock_button->set_tooltip(TTR("Unlock the selected object (can be moved).")); - group_button = memnew(ToolButton); + group_button = memnew(Button); + group_button->set_flat(true); hb->add_child(group_button); group_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(GROUP_SELECTED)); group_button->set_tooltip(TTR("Makes sure the object's children are not selectable.")); - ungroup_button = memnew(ToolButton); + ungroup_button = memnew(Button); + ungroup_button->set_flat(true); hb->add_child(ungroup_button); ungroup_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(UNGROUP_SELECTED)); ungroup_button->set_tooltip(TTR("Restores the object's children's ability to be selected.")); @@ -5748,7 +5766,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(memnew(VSeparator)); - override_camera_button = memnew(ToolButton); + override_camera_button = memnew(Button); + override_camera_button->set_flat(true); hb->add_child(override_camera_button); override_camera_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_override_camera)); override_camera_button->set_toggle_mode(true); @@ -5795,7 +5814,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { anchors_popup->set_name("Anchors"); anchors_popup->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback)); - anchor_mode_button = memnew(ToolButton); + anchor_mode_button = memnew(Button); + anchor_mode_button->set_flat(true); hb->add_child(anchor_mode_button); anchor_mode_button->set_toggle_mode(true); anchor_mode_button->hide(); diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 765d5f81d0..c5d74c6fc9 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -228,9 +228,9 @@ private: VScrollBar *v_scroll; HBoxContainer *hb; - ToolButton *zoom_minus; - ToolButton *zoom_reset; - ToolButton *zoom_plus; + Button *zoom_minus; + Button *zoom_reset; + Button *zoom_plus; Map<Control *, Timer *> popup_temporarily_timers; @@ -336,31 +336,31 @@ private: }; List<PoseClipboard> pose_clipboard; - ToolButton *select_button; + Button *select_button; - ToolButton *move_button; - ToolButton *scale_button; - ToolButton *rotate_button; + Button *move_button; + Button *scale_button; + Button *rotate_button; - ToolButton *list_select_button; - ToolButton *pivot_button; - ToolButton *pan_button; + Button *list_select_button; + Button *pivot_button; + Button *pan_button; - ToolButton *ruler_button; + Button *ruler_button; - ToolButton *smart_snap_button; - ToolButton *grid_snap_button; + Button *smart_snap_button; + Button *grid_snap_button; MenuButton *snap_config_menu; PopupMenu *smartsnap_config_popup; - ToolButton *lock_button; - ToolButton *unlock_button; + Button *lock_button; + Button *unlock_button; - ToolButton *group_button; - ToolButton *ungroup_button; + Button *group_button; + Button *ungroup_button; MenuButton *skeleton_menu; - ToolButton *override_camera_button; + Button *override_camera_button; MenuButton *view_menu; HBoxContainer *animation_hb; MenuButton *animation_menu; @@ -369,7 +369,7 @@ private: PopupMenu *anchors_and_margins_popup; PopupMenu *anchors_popup; - ToolButton *anchor_mode_button; + Button *anchor_mode_button; Button *key_loc_button; Button *key_rot_button; diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp index d9d9cf6a87..6eb17685f6 100644 --- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp @@ -501,12 +501,14 @@ CollisionPolygon3DEditor::CollisionPolygon3DEditor(EditorNode *p_editor) { undo_redo = EditorNode::get_undo_redo(); add_child(memnew(VSeparator)); - button_create = memnew(ToolButton); + button_create = memnew(Button); + button_create->set_flat(true); add_child(button_create); button_create->connect("pressed", callable_mp(this, &CollisionPolygon3DEditor::_menu_option), varray(MODE_CREATE)); button_create->set_toggle_mode(true); - button_edit = memnew(ToolButton); + button_edit = memnew(Button); + button_edit->set_flat(true); add_child(button_edit); button_edit->connect("pressed", callable_mp(this, &CollisionPolygon3DEditor::_menu_option), varray(MODE_EDIT)); button_edit->set_toggle_mode(true); diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.h b/editor/plugins/collision_polygon_3d_editor_plugin.h index 5215cbb678..05b8df520c 100644 --- a/editor/plugins/collision_polygon_3d_editor_plugin.h +++ b/editor/plugins/collision_polygon_3d_editor_plugin.h @@ -36,7 +36,6 @@ #include "scene/3d/collision_polygon_3d.h" #include "scene/3d/immediate_geometry_3d.h" #include "scene/3d/mesh_instance_3d.h" -#include "scene/gui/tool_button.h" class CanvasItemEditor; @@ -53,8 +52,8 @@ class CollisionPolygon3DEditor : public HBoxContainer { Mode mode; - ToolButton *button_create; - ToolButton *button_edit; + Button *button_create; + Button *button_edit; Ref<StandardMaterial3D> line_material; Ref<StandardMaterial3D> handle_material; diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 9cb167b41c..2889cb50a0 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -127,7 +127,8 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const RES &p_from, const Siz if (new_size.y > p_size.y) { new_size = Vector2(new_size.x * p_size.y / new_size.y, p_size.y); } - img->resize(new_size.x, new_size.y, Image::INTERPOLATE_CUBIC); + Vector2i new_size_i(MAX(1, (int)new_size.x), MAX(1, (int)new_size.y)); + img->resize(new_size_i.x, new_size_i.y, Image::INTERPOLATE_CUBIC); post_process_preview(img); diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp index 94f771e643..1b48e17772 100644 --- a/editor/plugins/gi_probe_editor_plugin.cpp +++ b/editor/plugins/gi_probe_editor_plugin.cpp @@ -144,7 +144,8 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) { bake_hb = memnew(HBoxContainer); bake_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL); bake_hb->hide(); - bake = memnew(ToolButton); + bake = memnew(Button); + bake->set_flat(true); bake->set_icon(editor->get_gui_base()->get_theme_icon("Bake", "EditorIcons")); bake->set_text(TTR("Bake GI Probe")); bake->connect("pressed", callable_mp(this, &GIProbeEditorPlugin::_bake)); diff --git a/editor/plugins/gi_probe_editor_plugin.h b/editor/plugins/gi_probe_editor_plugin.h index 508c3d825b..e55f287908 100644 --- a/editor/plugins/gi_probe_editor_plugin.h +++ b/editor/plugins/gi_probe_editor_plugin.h @@ -43,7 +43,7 @@ class GIProbeEditorPlugin : public EditorPlugin { HBoxContainer *bake_hb; Label *bake_info; - ToolButton *bake; + Button *bake; EditorNode *editor; EditorFileDialog *probe_file; diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp index 7402baad57..b4dcbdfe20 100644 --- a/editor/plugins/item_list_editor_plugin.cpp +++ b/editor/plugins/item_list_editor_plugin.cpp @@ -325,7 +325,8 @@ ItemListEditor::ItemListEditor() { selected_idx = -1; item_list = nullptr; - toolbar_button = memnew(ToolButton); + toolbar_button = memnew(Button); + toolbar_button->set_flat(true); toolbar_button->set_text(TTR("Items")); add_child(toolbar_button); toolbar_button->connect("pressed", callable_mp(this, &ItemListEditor::_edit_items)); diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h index 61dd617e3b..d89631633c 100644 --- a/editor/plugins/item_list_editor_plugin.h +++ b/editor/plugins/item_list_editor_plugin.h @@ -198,7 +198,7 @@ class ItemListEditor : public HBoxContainer { Node *item_list; - ToolButton *toolbar_button; + Button *toolbar_button; AcceptDialog *dialog; EditorInspector *property_editor; diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 796dd3f8b2..961ae10f46 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2106,12 +2106,7 @@ void Node3DEditorViewport::_nav_orbit(Ref<InputEventWithModifiers> p_event, cons cursor.x_rot += p_relative.y * radians_per_pixel; } cursor.y_rot += p_relative.x * radians_per_pixel; - if (cursor.x_rot > Math_PI / 2.0) { - cursor.x_rot = Math_PI / 2.0; - } - if (cursor.x_rot < -Math_PI / 2.0) { - cursor.x_rot = -Math_PI / 2.0; - } + cursor.x_rot = CLAMP(cursor.x_rot, -1.57, 1.57); name = ""; _update_name(); } @@ -2139,12 +2134,7 @@ void Node3DEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, const cursor.x_rot += p_relative.y * radians_per_pixel; } cursor.y_rot += p_relative.x * radians_per_pixel; - if (cursor.x_rot > Math_PI / 2.0) { - cursor.x_rot = Math_PI / 2.0; - } - if (cursor.x_rot < -Math_PI / 2.0) { - cursor.x_rot = -Math_PI / 2.0; - } + cursor.x_rot = CLAMP(cursor.x_rot, -1.57, 1.57); // Look is like the opposite of Orbit: the focus point rotates around the camera Transform camera_transform = to_camera_transform(cursor); @@ -2174,6 +2164,8 @@ void Node3DEditorViewport::set_freelook_active(bool active_now) { freelook_speed = base_speed * cursor.distance; } + previous_mouse_position = get_local_mouse_position(); + // Hide mouse like in an FPS (warping doesn't work) Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED); @@ -2183,6 +2175,11 @@ void Node3DEditorViewport::set_freelook_active(bool active_now) { // Restore mouse Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); + + // Restore the previous mouse position when leaving freelook mode. + // This is done because leaving `Input.MOUSE_MODE_CAPTURED` will center the cursor + // due to OS limitations. + warp_mouse(previous_mouse_position); } freelook_active = active_now; @@ -2341,13 +2338,6 @@ void Node3DEditorViewport::_notification(int p_what) { call_deferred("update_transform_gizmo_view"); } - if (p_what == NOTIFICATION_READY) { - // The crosshair icon doesn't depend on the editor theme. - crosshair->set_texture(get_theme_icon("Crosshair", "EditorIcons")); - // Set the anchors and margins after changing the icon to ensure it's centered correctly. - crosshair->set_anchors_and_margins_preset(PRESET_CENTER); - } - if (p_what == NOTIFICATION_PROCESS) { real_t delta = get_process_delta_time(); @@ -2473,10 +2463,6 @@ void Node3DEditorViewport::_notification(int p_what) { current_camera = camera; } - // Display the crosshair only while freelooking. Hide it otherwise, - // as the crosshair can be distracting. - crosshair->set_visible(freelook_active); - if (show_info) { String text; text += "X: " + rtos(current_camera->get_translation().x).pad_decimals(1) + "\n"; @@ -2583,14 +2569,14 @@ void Node3DEditorViewport::_notification(int p_what) { } } -static void draw_indicator_bar(Control &surface, real_t fill, Ref<Texture2D> icon) { +static void draw_indicator_bar(Control &surface, real_t fill, const Ref<Texture2D> icon, const Ref<Font> font, const String &text) { // Adjust bar size from control height - Vector2 surface_size = surface.get_size(); - real_t h = surface_size.y / 2.0; - real_t y = (surface_size.y - h) / 2.0; + const Vector2 surface_size = surface.get_size(); + const real_t h = surface_size.y / 2.0; + const real_t y = (surface_size.y - h) / 2.0; - Rect2 r(10, y, 6, h); - real_t sy = r.size.y * fill; + const Rect2 r(10 * EDSCALE, y, 6 * EDSCALE, h); + const real_t sy = r.size.y * fill; // Note: because this bar appears over the viewport, it has to stay readable for any background color // Draw both neutral dark and bright colors to account this @@ -2598,9 +2584,12 @@ static void draw_indicator_bar(Control &surface, real_t fill, Ref<Texture2D> ico surface.draw_rect(Rect2(r.position.x, r.position.y + r.size.y - sy, r.size.x, sy), Color(1, 1, 1, 0.6)); surface.draw_rect(r.grow(1), Color(0, 0, 0, 0.7), false, Math::round(EDSCALE)); - Vector2 icon_size = icon->get_size(); - Vector2 icon_pos = Vector2(r.position.x - (icon_size.x - r.size.x) / 2, r.position.y + r.size.y + 2); + const Vector2 icon_size = icon->get_size(); + const Vector2 icon_pos = Vector2(r.position.x - (icon_size.x - r.size.x) / 2, r.position.y + r.size.y + 2 * EDSCALE); surface.draw_texture(icon, icon_pos); + + // Draw text below the bar (for speed/zoom information). + surface.draw_string(font, Vector2(icon_pos.x, icon_pos.y + icon_size.y + 16 * EDSCALE), text); } void Node3DEditorViewport::_draw() { @@ -2697,7 +2686,14 @@ void Node3DEditorViewport::_draw() { logscale_t = 0.25 * Math::exp(4.0 * logscale_t - 1.0); } - draw_indicator_bar(*surface, 1.0 - logscale_t, get_theme_icon("ViewportSpeed", "EditorIcons")); + // Display the freelook speed to help the user get a better sense of scale. + const int precision = freelook_speed < 1.0 ? 2 : 1; + draw_indicator_bar( + *surface, + 1.0 - logscale_t, + get_theme_icon("ViewportSpeed", "EditorIcons"), + get_theme_font("font", "Label"), + vformat("%s u/s", String::num(freelook_speed).pad_decimals(precision))); } } else { @@ -2716,7 +2712,14 @@ void Node3DEditorViewport::_draw() { logscale_t = 0.25 * Math::exp(4.0 * logscale_t - 1.0); } - draw_indicator_bar(*surface, logscale_t, get_theme_icon("ViewportZoom", "EditorIcons")); + // Display the zoom center distance to help the user get a better sense of scale. + const int precision = cursor.distance < 1.0 ? 2 : 1; + draw_indicator_bar( + *surface, + logscale_t, + get_theme_icon("ViewportZoom", "EditorIcons"), + get_theme_font("font", "Label"), + vformat("%s u", String::num(cursor.distance).pad_decimals(precision))); } } } @@ -3205,7 +3208,7 @@ void Node3DEditorViewport::update_transform_gizmo_view() { Vector3 camz = -camera_xform.get_basis().get_axis(2).normalized(); Vector3 camy = -camera_xform.get_basis().get_axis(1).normalized(); Plane p(camera_xform.origin, camz); - float gizmo_d = Math::abs(p.distance_to(xform.origin)); + float gizmo_d = MAX(Math::abs(p.distance_to(xform.origin)), CMP_EPSILON); float d0 = camera->unproject_position(camera_xform.origin + camz * gizmo_d).y; float d1 = camera->unproject_position(camera_xform.origin + camz * gizmo_d + camy).y; float dd = Math::abs(d0 - d1); @@ -3849,10 +3852,6 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito camera->make_current(); surface->set_focus_mode(FOCUS_ALL); - crosshair = memnew(TextureRect); - crosshair->set_mouse_filter(MOUSE_FILTER_IGNORE); - surface->add_child(crosshair); - VBoxContainer *vbox = memnew(VBoxContainer); surface->add_child(vbox); vbox->set_position(Point2(10, 10) * EDSCALE); @@ -6039,7 +6038,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { button_binds.resize(1); String sct; - tool_button[TOOL_MODE_SELECT] = memnew(ToolButton); + tool_button[TOOL_MODE_SELECT] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_MODE_SELECT]); tool_button[TOOL_MODE_SELECT]->set_toggle_mode(true); tool_button[TOOL_MODE_SELECT]->set_flat(true); @@ -6051,7 +6050,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { hbc_menu->add_child(memnew(VSeparator)); - tool_button[TOOL_MODE_MOVE] = memnew(ToolButton); + tool_button[TOOL_MODE_MOVE] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_MODE_MOVE]); tool_button[TOOL_MODE_MOVE]->set_toggle_mode(true); tool_button[TOOL_MODE_MOVE]->set_flat(true); @@ -6059,7 +6058,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_MOVE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), KEY_W)); - tool_button[TOOL_MODE_ROTATE] = memnew(ToolButton); + tool_button[TOOL_MODE_ROTATE] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_MODE_ROTATE]); tool_button[TOOL_MODE_ROTATE]->set_toggle_mode(true); tool_button[TOOL_MODE_ROTATE]->set_flat(true); @@ -6067,7 +6066,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_ROTATE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), KEY_E)); - tool_button[TOOL_MODE_SCALE] = memnew(ToolButton); + tool_button[TOOL_MODE_SCALE] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_MODE_SCALE]); tool_button[TOOL_MODE_SCALE]->set_toggle_mode(true); tool_button[TOOL_MODE_SCALE]->set_flat(true); @@ -6077,7 +6076,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { hbc_menu->add_child(memnew(VSeparator)); - tool_button[TOOL_MODE_LIST_SELECT] = memnew(ToolButton); + tool_button[TOOL_MODE_LIST_SELECT] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_MODE_LIST_SELECT]); tool_button[TOOL_MODE_LIST_SELECT]->set_toggle_mode(true); tool_button[TOOL_MODE_LIST_SELECT]->set_flat(true); @@ -6085,25 +6084,25 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_LIST_SELECT]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_MODE_LIST_SELECT]->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode).")); - tool_button[TOOL_LOCK_SELECTED] = memnew(ToolButton); + tool_button[TOOL_LOCK_SELECTED] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_LOCK_SELECTED]); button_binds.write[0] = MENU_LOCK_SELECTED; tool_button[TOOL_LOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_LOCK_SELECTED]->set_tooltip(TTR("Lock the selected object in place (can't be moved).")); - tool_button[TOOL_UNLOCK_SELECTED] = memnew(ToolButton); + tool_button[TOOL_UNLOCK_SELECTED] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_UNLOCK_SELECTED]); button_binds.write[0] = MENU_UNLOCK_SELECTED; tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip(TTR("Unlock the selected object (can be moved).")); - tool_button[TOOL_GROUP_SELECTED] = memnew(ToolButton); + tool_button[TOOL_GROUP_SELECTED] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_GROUP_SELECTED]); button_binds.write[0] = MENU_GROUP_SELECTED; tool_button[TOOL_GROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_GROUP_SELECTED]->set_tooltip(TTR("Makes sure the object's children are not selectable.")); - tool_button[TOOL_UNGROUP_SELECTED] = memnew(ToolButton); + tool_button[TOOL_UNGROUP_SELECTED] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_UNGROUP_SELECTED]); button_binds.write[0] = MENU_UNGROUP_SELECTED; tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); @@ -6111,7 +6110,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { hbc_menu->add_child(memnew(VSeparator)); - tool_option_button[TOOL_OPT_LOCAL_COORDS] = memnew(ToolButton); + tool_option_button[TOOL_OPT_LOCAL_COORDS] = memnew(Button); hbc_menu->add_child(tool_option_button[TOOL_OPT_LOCAL_COORDS]); tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_toggle_mode(true); tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_flat(true); @@ -6119,7 +6118,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled), button_binds); tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut(ED_SHORTCUT("spatial_editor/local_coords", TTR("Use Local Space"), KEY_T)); - tool_option_button[TOOL_OPT_USE_SNAP] = memnew(ToolButton); + tool_option_button[TOOL_OPT_USE_SNAP] = memnew(Button); hbc_menu->add_child(tool_option_button[TOOL_OPT_USE_SNAP]); tool_option_button[TOOL_OPT_USE_SNAP]->set_toggle_mode(true); tool_option_button[TOOL_OPT_USE_SNAP]->set_flat(true); @@ -6129,7 +6128,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { hbc_menu->add_child(memnew(VSeparator)); - tool_option_button[TOOL_OPT_OVERRIDE_CAMERA] = memnew(ToolButton); + tool_option_button[TOOL_OPT_OVERRIDE_CAMERA] = memnew(Button); hbc_menu->add_child(tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]); tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_toggle_mode(true); tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_flat(true); diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 83173b5ad2..2fe1938f28 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -284,8 +284,8 @@ private: bool freelook_active; real_t freelook_speed; + Vector2 previous_mouse_position; - TextureRect *crosshair; Label *info_label; Label *cinema_label; Label *locked_label; diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index a3dab665b8..f79098ce5d 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -532,35 +532,40 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) { sep = memnew(VSeparator); base_hb->add_child(sep); - curve_edit = memnew(ToolButton); + curve_edit = memnew(Button); + curve_edit->set_flat(true); curve_edit->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveEdit", "EditorIcons")); curve_edit->set_toggle_mode(true); curve_edit->set_focus_mode(Control::FOCUS_NONE); curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string(KEY_MASK_CMD) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point")); curve_edit->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_EDIT)); base_hb->add_child(curve_edit); - curve_edit_curve = memnew(ToolButton); + curve_edit_curve = memnew(Button); + curve_edit_curve->set_flat(true); curve_edit_curve->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveCurve", "EditorIcons")); curve_edit_curve->set_toggle_mode(true); curve_edit_curve->set_focus_mode(Control::FOCUS_NONE); curve_edit_curve->set_tooltip(TTR("Select Control Points (Shift+Drag)")); curve_edit_curve->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_EDIT_CURVE)); base_hb->add_child(curve_edit_curve); - curve_create = memnew(ToolButton); + curve_create = memnew(Button); + curve_create->set_flat(true); curve_create->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveCreate", "EditorIcons")); curve_create->set_toggle_mode(true); curve_create->set_focus_mode(Control::FOCUS_NONE); curve_create->set_tooltip(TTR("Add Point (in empty space)")); curve_create->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_CREATE)); base_hb->add_child(curve_create); - curve_del = memnew(ToolButton); + curve_del = memnew(Button); + curve_del->set_flat(true); curve_del->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveDelete", "EditorIcons")); curve_del->set_toggle_mode(true); curve_del->set_focus_mode(Control::FOCUS_NONE); curve_del->set_tooltip(TTR("Delete Point")); curve_del->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_DELETE)); base_hb->add_child(curve_del); - curve_close = memnew(ToolButton); + curve_close = memnew(Button); + curve_close->set_flat(true); curve_close->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveClose", "EditorIcons")); curve_close->set_focus_mode(Control::FOCUS_NONE); curve_close->set_tooltip(TTR("Close Curve")); diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h index 390dfdfdf7..d0c02b28d4 100644 --- a/editor/plugins/path_2d_editor_plugin.h +++ b/editor/plugins/path_2d_editor_plugin.h @@ -34,7 +34,6 @@ #include "editor/editor_node.h" #include "editor/editor_plugin.h" #include "scene/2d/path_2d.h" -#include "scene/gui/tool_button.h" class CanvasItemEditor; @@ -60,11 +59,11 @@ class Path2DEditor : public HBoxContainer { }; Mode mode; - ToolButton *curve_create; - ToolButton *curve_edit; - ToolButton *curve_edit_curve; - ToolButton *curve_del; - ToolButton *curve_close; + Button *curve_create; + Button *curve_edit; + Button *curve_edit_curve; + Button *curve_del; + Button *curve_close; MenuButton *handle_menu; bool mirror_handle_angle; diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index 25cffa3d6c..f53130c24d 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -557,28 +557,32 @@ Path3DEditorPlugin::Path3DEditorPlugin(EditorNode *p_node) { sep = memnew(VSeparator); sep->hide(); Node3DEditor::get_singleton()->add_control_to_menu_panel(sep); - curve_edit = memnew(ToolButton); + curve_edit = memnew(Button); + curve_edit->set_flat(true); curve_edit->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveEdit", "EditorIcons")); curve_edit->set_toggle_mode(true); curve_edit->hide(); curve_edit->set_focus_mode(Control::FOCUS_NONE); curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string(KEY_MASK_CMD) + TTR("Click: Add Point") + "\n" + TTR("Right Click: Delete Point")); Node3DEditor::get_singleton()->add_control_to_menu_panel(curve_edit); - curve_create = memnew(ToolButton); + curve_create = memnew(Button); + curve_create->set_flat(true); curve_create->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveCreate", "EditorIcons")); curve_create->set_toggle_mode(true); curve_create->hide(); curve_create->set_focus_mode(Control::FOCUS_NONE); curve_create->set_tooltip(TTR("Add Point (in empty space)") + "\n" + TTR("Split Segment (in curve)")); Node3DEditor::get_singleton()->add_control_to_menu_panel(curve_create); - curve_del = memnew(ToolButton); + curve_del = memnew(Button); + curve_del->set_flat(true); curve_del->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveDelete", "EditorIcons")); curve_del->set_toggle_mode(true); curve_del->hide(); curve_del->set_focus_mode(Control::FOCUS_NONE); curve_del->set_tooltip(TTR("Delete Point")); Node3DEditor::get_singleton()->add_control_to_menu_panel(curve_del); - curve_close = memnew(ToolButton); + curve_close = memnew(Button); + curve_close->set_flat(true); curve_close->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveClose", "EditorIcons")); curve_close->hide(); curve_close->set_focus_mode(Control::FOCUS_NONE); diff --git a/editor/plugins/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h index 8bec5df797..3a75717b73 100644 --- a/editor/plugins/path_3d_editor_plugin.h +++ b/editor/plugins/path_3d_editor_plugin.h @@ -68,10 +68,10 @@ class Path3DEditorPlugin : public EditorPlugin { GDCLASS(Path3DEditorPlugin, EditorPlugin); Separator *sep; - ToolButton *curve_create; - ToolButton *curve_edit; - ToolButton *curve_del; - ToolButton *curve_close; + Button *curve_create; + Button *curve_edit; + Button *curve_del; + Button *curve_close; MenuButton *handle_menu; EditorNode *editor; diff --git a/editor/plugins/physical_bone_3d_editor_plugin.cpp b/editor/plugins/physical_bone_3d_editor_plugin.cpp index bcbf88e7dc..30bf827b3c 100644 --- a/editor/plugins/physical_bone_3d_editor_plugin.cpp +++ b/editor/plugins/physical_bone_3d_editor_plugin.cpp @@ -55,7 +55,8 @@ PhysicalBone3DEditor::PhysicalBone3DEditor(EditorNode *p_editor) : spatial_editor_hb->add_child(memnew(VSeparator)); - button_transform_joint = memnew(ToolButton); + button_transform_joint = memnew(Button); + button_transform_joint->set_flat(true); spatial_editor_hb->add_child(button_transform_joint); button_transform_joint->set_text(TTR("Move Joint")); diff --git a/editor/plugins/physical_bone_3d_editor_plugin.h b/editor/plugins/physical_bone_3d_editor_plugin.h index 79c7cc4bb1..8699176fe0 100644 --- a/editor/plugins/physical_bone_3d_editor_plugin.h +++ b/editor/plugins/physical_bone_3d_editor_plugin.h @@ -38,7 +38,7 @@ class PhysicalBone3DEditor : public Object { EditorNode *editor; HBoxContainer *spatial_editor_hb; - ToolButton *button_transform_joint; + Button *button_transform_joint; PhysicalBone3D *selected = nullptr; diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 1f98c0139b..633863041f 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -485,7 +485,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { } else { Vector2 tuv = mtx.affine_inverse().xform(snap_point(Vector2(mb->get_position().x, mb->get_position().y))); - if (points_prev.size() > 2 && tuv.distance_to(points_prev[0]) < 8) { + // Close the polygon if selected point is near start. Threshold for closing scaled by zoom level + if (points_prev.size() > 2 && tuv.distance_to(points_prev[0]) < (8 / uv_draw_zoom)) { undo_redo->create_action(TTR("Create Polygon & UV")); undo_redo->add_do_method(node, "set_uv", node->get_uv()); undo_redo->add_undo_method(node, "set_uv", uv_create_uv_prev); @@ -1214,7 +1215,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : use_snap = EditorSettings::get_singleton()->get_project_metadata("polygon_2d_uv_editor", "snap_enabled", false); snap_show_grid = EditorSettings::get_singleton()->get_project_metadata("polygon_2d_uv_editor", "show_grid", false); - button_uv = memnew(ToolButton); + button_uv = memnew(Button); + button_uv->set_flat(true); add_child(button_uv); button_uv->set_tooltip(TTR("Open Polygon 2D UV editor.")); button_uv->connect("pressed", callable_mp(this, &Polygon2DEditor::_menu_option), varray(MODE_EDIT_UV)); @@ -1231,16 +1233,16 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : uv_edit_group.instance(); - uv_edit_mode[0] = memnew(ToolButton); + uv_edit_mode[0] = memnew(Button); uv_mode_hb->add_child(uv_edit_mode[0]); uv_edit_mode[0]->set_toggle_mode(true); - uv_edit_mode[1] = memnew(ToolButton); + uv_edit_mode[1] = memnew(Button); uv_mode_hb->add_child(uv_edit_mode[1]); uv_edit_mode[1]->set_toggle_mode(true); - uv_edit_mode[2] = memnew(ToolButton); + uv_edit_mode[2] = memnew(Button); uv_mode_hb->add_child(uv_edit_mode[2]); uv_edit_mode[2]->set_toggle_mode(true); - uv_edit_mode[3] = memnew(ToolButton); + uv_edit_mode[3] = memnew(Button); uv_mode_hb->add_child(uv_edit_mode[3]); uv_edit_mode[3]->set_toggle_mode(true); @@ -1264,7 +1266,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : uv_main_vb->add_child(uv_mode_hb); for (int i = 0; i < UV_MODE_MAX; i++) { - uv_button[i] = memnew(ToolButton); + uv_button[i] = memnew(Button); uv_button[i]->set_toggle_mode(true); uv_mode_hb->add_child(uv_button[i]); uv_button[i]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_mode), varray(i)); @@ -1334,7 +1336,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : uv_mode_hb->add_child(memnew(VSeparator)); - b_snap_enable = memnew(ToolButton); + b_snap_enable = memnew(Button); + b_snap_enable->set_flat(true); uv_mode_hb->add_child(b_snap_enable); b_snap_enable->set_text(TTR("Snap")); b_snap_enable->set_focus_mode(FOCUS_NONE); @@ -1343,7 +1346,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : b_snap_enable->set_tooltip(TTR("Enable Snap")); b_snap_enable->connect("toggled", callable_mp(this, &Polygon2DEditor::_set_use_snap)); - b_snap_grid = memnew(ToolButton); + b_snap_grid = memnew(Button); + b_snap_grid->set_flat(true); uv_mode_hb->add_child(b_snap_grid); b_snap_grid->set_text(TTR("Grid")); b_snap_grid->set_focus_mode(FOCUS_NONE); diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h index b94ae53e2b..33ea7722ac 100644 --- a/editor/plugins/polygon_2d_editor_plugin.h +++ b/editor/plugins/polygon_2d_editor_plugin.h @@ -60,16 +60,16 @@ class Polygon2DEditor : public AbstractPolygon2DEditor { UV_MODE_MAX }; - ToolButton *uv_edit_mode[4]; + Button *uv_edit_mode[4]; Ref<ButtonGroup> uv_edit_group; Polygon2D *node; UVMode uv_mode; AcceptDialog *uv_edit; - ToolButton *uv_button[UV_MODE_MAX]; - ToolButton *b_snap_enable; - ToolButton *b_snap_grid; + Button *uv_button[UV_MODE_MAX]; + Button *b_snap_enable; + Button *b_snap_grid; Panel *uv_edit_draw; HSlider *uv_zoom; SpinBox *uv_zoom_value; @@ -115,7 +115,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor { AcceptDialog *error; - ToolButton *button_uv; + Button *button_uv; bool use_snap; bool snap_show_grid; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 48a9febcf9..96079d5418 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2988,7 +2988,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { filename->add_theme_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox("normal", "LineEdit")); buttons_hbox->add_child(filename); - members_overview_alphabeta_sort_button = memnew(ToolButton); + members_overview_alphabeta_sort_button = memnew(Button); + members_overview_alphabeta_sort_button->set_flat(true); members_overview_alphabeta_sort_button->set_tooltip(TTR("Toggle alphabetical sorting of the method list.")); members_overview_alphabeta_sort_button->set_toggle_mode(true); members_overview_alphabeta_sort_button->set_pressed(EditorSettings::get_singleton()->get("text_editor/tools/sort_members_outline_alphabetically")); @@ -3049,7 +3050,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { file_menu->get_popup()->add_separator(); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save", TTR("Save"), KEY_MASK_ALT | KEY_MASK_CMD | KEY_S), FILE_SAVE); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_as", TTR("Save As...")), FILE_SAVE_AS); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_all", TTR("Save All"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_S), FILE_SAVE_ALL); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_all", TTR("Save All"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_S), FILE_SAVE_ALL); file_menu->get_popup()->add_separator(); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_script_soft", TTR("Soft Reload Script"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_R), FILE_TOOL_RELOAD_SOFT); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/copy_path", TTR("Copy Script Path")), FILE_COPY_PATH); @@ -3115,13 +3116,15 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { menu_hb->add_spacer(); - site_search = memnew(ToolButton); + site_search = memnew(Button); + site_search->set_flat(true); site_search->set_text(TTR("Online Docs")); site_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(SEARCH_WEBSITE)); menu_hb->add_child(site_search); site_search->set_tooltip(TTR("Open Godot online documentation.")); - help_search = memnew(ToolButton); + help_search = memnew(Button); + help_search->set_flat(true); help_search->set_text(TTR("Search Help")); help_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(SEARCH_HELP)); menu_hb->add_child(help_search); @@ -3129,13 +3132,15 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { menu_hb->add_child(memnew(VSeparator)); - script_back = memnew(ToolButton); + script_back = memnew(Button); + script_back->set_flat(true); script_back->connect("pressed", callable_mp(this, &ScriptEditor::_history_back)); menu_hb->add_child(script_back); script_back->set_disabled(true); script_back->set_tooltip(TTR("Go to previous edited document.")); - script_forward = memnew(ToolButton); + script_forward = memnew(Button); + script_forward->set_flat(true); script_forward->connect("pressed", callable_mp(this, &ScriptEditor::_history_forward)); menu_hb->add_child(script_forward); script_forward->set_disabled(true); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index f7352be7e8..8c4b7de27d 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -43,7 +43,6 @@ #include "scene/gui/split_container.h" #include "scene/gui/tab_container.h" #include "scene/gui/text_edit.h" -#include "scene/gui/tool_button.h" #include "scene/gui/tree.h" #include "scene/main/timer.h" #include "scene/resources/text_file.h" @@ -211,7 +210,7 @@ class ScriptEditor : public PanelContainer { VBoxContainer *overview_vbox; HBoxContainer *buttons_hbox; Label *filename; - ToolButton *members_overview_alphabeta_sort_button; + Button *members_overview_alphabeta_sort_button; bool members_overview_enabled; ItemList *help_overview; bool help_overview_enabled; @@ -221,15 +220,15 @@ class ScriptEditor : public PanelContainer { AcceptDialog *error_dialog; ConfirmationDialog *erase_tab_confirm; ScriptCreateDialog *script_create_dialog; - ToolButton *scripts_visible; + Button *scripts_visible; String current_theme; TextureRect *script_icon; Label *script_name_label; - ToolButton *script_back; - ToolButton *script_forward; + Button *script_back; + Button *script_forward; FindInFilesDialog *find_in_files_dialog; FindInFilesPanel *find_in_files; diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 4b79d8c344..1c9dadc0dd 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -383,10 +383,6 @@ void ScriptTextEditor::_show_warnings_panel(bool p_show) { warnings_panel->set_visible(p_show); } -void ScriptTextEditor::_error_pressed() { - code_editor->goto_error(); -} - void ScriptTextEditor::_warning_clicked(Variant p_line) { if (p_line.get_type() == Variant::INT) { code_editor->get_text_edit()->cursor_set_line(p_line.operator int64_t()); @@ -1759,7 +1755,6 @@ ScriptTextEditor::ScriptTextEditor() { warnings_panel->set_focus_mode(FOCUS_CLICK); warnings_panel->hide(); - code_editor->connect("error_pressed", callable_mp(this, &ScriptTextEditor::_error_pressed)); code_editor->connect("show_warnings_panel", callable_mp(this, &ScriptTextEditor::_show_warnings_panel)); warnings_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_warning_clicked)); diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index adcd0218bc..8fa380b64d 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -159,7 +159,6 @@ protected: void _load_theme_settings(); void _set_theme_for_script(); void _show_warnings_panel(bool p_show); - void _error_pressed(); void _warning_clicked(Variant p_line); void _notification(int p_what); diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 2586f17fe1..52da8dea19 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -62,125 +62,56 @@ void BoneTransformEditor::create_editors() { enabled_checkbox->set_visible(toggle_enabled); section->get_vbox()->add_child(enabled_checkbox); - Label *l1 = memnew(Label(TTR("Translation"))); - section->get_vbox()->add_child(l1); - - translation_grid = memnew(GridContainer()); - translation_grid->set_columns(TRANSLATION_COMPONENTS); - section->get_vbox()->add_child(translation_grid); - - Label *l2 = memnew(Label(TTR("Rotation Degrees"))); - section->get_vbox()->add_child(l2); - - rotation_grid = memnew(GridContainer()); - rotation_grid->set_columns(ROTATION_DEGREES_COMPONENTS); - section->get_vbox()->add_child(rotation_grid); - - Label *l3 = memnew(Label(TTR("Scale"))); - section->get_vbox()->add_child(l3); - - scale_grid = memnew(GridContainer()); - scale_grid->set_columns(SCALE_COMPONENTS); - section->get_vbox()->add_child(scale_grid); - - Label *l4 = memnew(Label(TTR("Transform"))); - section->get_vbox()->add_child(l4); - - transform_grid = memnew(GridContainer()); - transform_grid->set_columns(TRANSFORM_CONTROL_COMPONENTS); - section->get_vbox()->add_child(transform_grid); - - static const char *desc[TRANSFORM_COMPONENTS] = { "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z" }; - - for (int i = 0; i < TRANSFORM_CONTROL_COMPONENTS; ++i) { - translation_slider[i] = memnew(EditorSpinSlider()); - translation_slider[i]->set_label(desc[i]); - setup_spinner(translation_slider[i], false); - translation_grid->add_child(translation_slider[i]); - - rotation_slider[i] = memnew(EditorSpinSlider()); - rotation_slider[i]->set_label(desc[i]); - setup_spinner(rotation_slider[i], false); - rotation_grid->add_child(rotation_slider[i]); - - scale_slider[i] = memnew(EditorSpinSlider()); - scale_slider[i]->set_label(desc[i]); - setup_spinner(scale_slider[i], false); - scale_grid->add_child(scale_slider[i]); - } - - for (int i = 0; i < TRANSFORM_COMPONENTS; ++i) { - transform_slider[i] = memnew(EditorSpinSlider()); - transform_slider[i]->set_label(desc[i]); - setup_spinner(transform_slider[i], true); - transform_grid->add_child(transform_slider[i]); - } -} - -void BoneTransformEditor::setup_spinner(EditorSpinSlider *spinner, const bool is_transform_spinner) { - spinner->set_flat(true); - spinner->set_min(-10000); - spinner->set_max(10000); - spinner->set_step(0.001f); - spinner->set_hide_slider(true); - spinner->set_allow_greater(true); - spinner->set_allow_lesser(true); - spinner->set_h_size_flags(SIZE_EXPAND_FILL); - - spinner->connect_compat("value_changed", this, "_value_changed", varray(is_transform_spinner)); + // Translation property + translation_property = memnew(EditorPropertyVector3()); + translation_property->setup(-10000, 10000, 0.001f, true); + translation_property->set_label("Translation"); + translation_property->set_use_folding(true); + translation_property->set_read_only(false); + translation_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3)); + section->get_vbox()->add_child(translation_property); + + // Rotation property + rotation_property = memnew(EditorPropertyVector3()); + rotation_property->setup(-10000, 10000, 0.001f, true); + rotation_property->set_label("Rotation Degrees"); + rotation_property->set_use_folding(true); + rotation_property->set_read_only(false); + rotation_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3)); + section->get_vbox()->add_child(rotation_property); + + // Scale property + scale_property = memnew(EditorPropertyVector3()); + scale_property->setup(-10000, 10000, 0.001f, true); + scale_property->set_label("Scale"); + scale_property->set_use_folding(true); + scale_property->set_read_only(false); + scale_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3)); + section->get_vbox()->add_child(scale_property); + + // Transform/Matrix section + transform_section = memnew(EditorInspectorSection); + transform_section->setup("trf_properties_transform", "Matrix", this, section_color, true); + section->get_vbox()->add_child(transform_section); + + // Transform/Matrix property + transform_property = memnew(EditorPropertyTransform()); + transform_property->setup(-10000, 10000, 0.001f, true); + transform_property->set_label("Transform"); + transform_property->set_use_folding(true); + transform_property->set_read_only(false); + transform_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_transform)); + transform_section->get_vbox()->add_child(transform_property); } void BoneTransformEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { create_editors(); - key_button->connect_compat("pressed", this, "_key_button_pressed"); - enabled_checkbox->connect_compat("toggled", this, "_checkbox_toggled"); + key_button->connect("pressed", callable_mp(this, &BoneTransformEditor::_key_button_pressed)); + enabled_checkbox->connect("toggled", callable_mp(this, &BoneTransformEditor::_checkbox_toggled)); [[fallthrough]]; } - case NOTIFICATION_THEME_CHANGED: { - const Color base = get_theme_color("accent_color", "Editor"); - const Color bg_color = get_theme_color("property_color", "Editor"); - const Color bg_lbl_color(bg_color.r, bg_color.g, bg_color.b, 0.5); - - for (int i = 0; i < TRANSLATION_COMPONENTS; i++) { - Color c = base; - c.set_hsv(float(i % TRANSLATION_COMPONENTS) / TRANSLATION_COMPONENTS + 0.05, c.get_s() * 0.75, c.get_v()); - if (!translation_slider[i]) { - continue; - } - translation_slider[i]->set_custom_label_color(true, c); - } - - for (int i = 0; i < ROTATION_DEGREES_COMPONENTS; i++) { - Color c = base; - c.set_hsv(float(i % ROTATION_DEGREES_COMPONENTS) / ROTATION_DEGREES_COMPONENTS + 0.05, c.get_s() * 0.75, c.get_v()); - if (!rotation_slider[i]) { - continue; - } - rotation_slider[i]->set_custom_label_color(true, c); - } - - for (int i = 0; i < SCALE_COMPONENTS; i++) { - Color c = base; - c.set_hsv(float(i % SCALE_COMPONENTS) / SCALE_COMPONENTS + 0.05, c.get_s() * 0.75, c.get_v()); - if (!scale_slider[i]) { - continue; - } - scale_slider[i]->set_custom_label_color(true, c); - } - - for (int i = 0; i < TRANSFORM_COMPONENTS; i++) { - Color c = base; - c.set_hsv(float(i % TRANSFORM_COMPONENTS) / TRANSFORM_COMPONENTS + 0.05, c.get_s() * 0.75, c.get_v()); - if (!transform_slider[i]) { - continue; - } - transform_slider[i]->set_custom_label_color(true, c); - } - - break; - } case NOTIFICATION_SORT_CHILDREN: { const Ref<Font> font = get_theme_font("font", "Tree"); @@ -189,8 +120,8 @@ void BoneTransformEditor::_notification(int p_what) { buffer.y += font->get_height(); buffer.y += get_theme_constant("vseparation", "Tree"); - const float vector_height = translation_grid->get_size().y; - const float transform_height = transform_grid->get_size().y; + const float vector_height = translation_property->get_size().y; + const float transform_height = transform_property->get_size().y; const float button_height = key_button->get_size().y; const float width = get_size().x - get_theme_constant("inspector_margin", "Editor"); @@ -202,10 +133,10 @@ void BoneTransformEditor::_notification(int p_what) { } if (section->get_vbox()->is_visible()) { - input_rects.push_back(Rect2(translation_grid->get_position() + buffer, Size2(width, vector_height))); - input_rects.push_back(Rect2(rotation_grid->get_position() + buffer, Size2(width, vector_height))); - input_rects.push_back(Rect2(scale_grid->get_position() + buffer, Size2(width, vector_height))); - input_rects.push_back(Rect2(transform_grid->get_position() + buffer, Size2(width, transform_height))); + input_rects.push_back(Rect2(translation_property->get_position() + buffer, Size2(width, vector_height))); + input_rects.push_back(Rect2(rotation_property->get_position() + buffer, Size2(width, vector_height))); + input_rects.push_back(Rect2(scale_property->get_position() + buffer, Size2(width, vector_height))); + input_rects.push_back(Rect2(transform_property->get_position() + buffer, Size2(width, transform_height))); } else { const int32_t start = input_rects.size(); const int32_t empty_input_rect_elements = 4; @@ -234,49 +165,53 @@ void BoneTransformEditor::_notification(int p_what) { } } -void BoneTransformEditor::_value_changed(const double p_value, const bool p_from_transform) { +void BoneTransformEditor::_value_changed(const double p_value) { if (updating) return; - if (property.get_slicec('/', 0) == "bones" && property.get_slicec('/', 2) == "custom_pose") { - const Transform tform = compute_transform(p_from_transform); + Transform tform = compute_transform_from_vector3s(); + _change_transform(tform); +} +void BoneTransformEditor::_value_changed_vector3(const String p_property_name, const Vector3 p_vector, const StringName p_edited_property_name, const bool p_boolean) { + if (updating) + return; + Transform tform = compute_transform_from_vector3s(); + _change_transform(tform); +} + +Transform BoneTransformEditor::compute_transform_from_vector3s() const { + // Convert rotation from degrees to radians. + Vector3 prop_rotation = rotation_property->get_vector(); + prop_rotation.x = Math::deg2rad(prop_rotation.x); + prop_rotation.y = Math::deg2rad(prop_rotation.y); + prop_rotation.z = Math::deg2rad(prop_rotation.z); + + return Transform( + Basis(prop_rotation, scale_property->get_vector()), + translation_property->get_vector()); +} + +void BoneTransformEditor::_value_changed_transform(const String p_property_name, const Transform p_transform, const StringName p_edited_property_name, const bool p_boolean) { + if (updating) + return; + _change_transform(p_transform); +} + +void BoneTransformEditor::_change_transform(Transform p_new_transform) { + if (property.get_slicec('/', 0) == "bones" && property.get_slicec('/', 2) == "custom_pose") { undo_redo->create_action(TTR("Set Custom Bone Pose Transform"), UndoRedo::MERGE_ENDS); undo_redo->add_undo_method(skeleton, "set_bone_custom_pose", property.get_slicec('/', 1).to_int(), skeleton->get_bone_custom_pose(property.get_slicec('/', 1).to_int())); - undo_redo->add_do_method(skeleton, "set_bone_custom_pose", property.get_slicec('/', 1).to_int(), tform); + undo_redo->add_do_method(skeleton, "set_bone_custom_pose", property.get_slicec('/', 1).to_int(), p_new_transform); undo_redo->commit_action(); } else if (property.get_slicec('/', 0) == "bones") { - const Transform tform = compute_transform(p_from_transform); - undo_redo->create_action(TTR("Set Bone Transform"), UndoRedo::MERGE_ENDS); undo_redo->add_undo_property(skeleton, property, skeleton->get(property)); - undo_redo->add_do_property(skeleton, property, tform); + undo_redo->add_do_property(skeleton, property, p_new_transform); undo_redo->commit_action(); } } -Transform BoneTransformEditor::compute_transform(const bool p_from_transform) const { - // Last modified was a raw transform column... - if (p_from_transform) { - Transform tform; - - for (int i = 0; i < BASIS_COMPONENTS; ++i) { - tform.basis[i / BASIS_SPLIT_COMPONENTS][i % BASIS_SPLIT_COMPONENTS] = transform_slider[i]->get_value(); - } - - for (int i = 0; i < TRANSLATION_COMPONENTS; ++i) { - tform.origin[i] = transform_slider[i + BASIS_COMPONENTS]->get_value(); - } - - return tform; - } - - return Transform( - Basis(Vector3(Math::deg2rad(rotation_slider[0]->get_value()), Math::deg2rad(rotation_slider[1]->get_value()), Math::deg2rad(rotation_slider[2]->get_value())), - Vector3(scale_slider[0]->get_value(), scale_slider[1]->get_value(), scale_slider[2]->get_value())), - Vector3(translation_slider[0]->get_value(), translation_slider[1]->get_value(), translation_slider[2]->get_value())); -} - void BoneTransformEditor::update_enabled_checkbox() { if (enabled_checkbox) { const String path = "bones/" + property.get_slicec('/', 1) + "/enabled"; @@ -285,12 +220,6 @@ void BoneTransformEditor::update_enabled_checkbox() { } } -void BoneTransformEditor::_bind_methods() { - ClassDB::bind_method(D_METHOD("_value_changed", "value"), &BoneTransformEditor::_value_changed); - ClassDB::bind_method(D_METHOD("_key_button_pressed"), &BoneTransformEditor::_key_button_pressed); - ClassDB::bind_method(D_METHOD("_checkbox_toggled", "toggled"), &BoneTransformEditor::_checkbox_toggled); -} - void BoneTransformEditor::_update_properties() { if (updating) return; @@ -318,47 +247,22 @@ void BoneTransformEditor::_update_custom_pose_properties() { } void BoneTransformEditor::_update_transform_properties(Transform tform) { - Quat rot = tform.get_basis(); - Vector3 rot_rad = rot.get_euler(); - Vector3 rot_degrees = Vector3(Math::rad2deg(rot_rad.x), Math::rad2deg(rot_rad.y), Math::rad2deg(rot_rad.z)); - Vector3 tr = tform.get_origin(); + Basis rotation_basis = tform.get_basis(); + Vector3 rotation_radians = rotation_basis.get_rotation_euler(); + Vector3 rotation_degrees = Vector3(Math::rad2deg(rotation_radians.x), Math::rad2deg(rotation_radians.y), Math::rad2deg(rotation_radians.z)); + Vector3 translation = tform.get_origin(); Vector3 scale = tform.basis.get_scale(); - for (int i = 0; i < TRANSLATION_COMPONENTS; i++) { - translation_slider[i]->set_value(tr[i]); - } - - for (int i = 0; i < ROTATION_DEGREES_COMPONENTS; i++) { - rotation_slider[i]->set_value(rot_degrees[i]); - } - - for (int i = 0; i < SCALE_COMPONENTS; i++) { - scale_slider[i]->set_value(scale[i]); - } - - transform_slider[0]->set_value(tform.get_basis()[Vector3::AXIS_X].x); - transform_slider[1]->set_value(tform.get_basis()[Vector3::AXIS_X].y); - transform_slider[2]->set_value(tform.get_basis()[Vector3::AXIS_X].z); - transform_slider[3]->set_value(tform.get_basis()[Vector3::AXIS_Y].x); - transform_slider[4]->set_value(tform.get_basis()[Vector3::AXIS_Y].y); - transform_slider[5]->set_value(tform.get_basis()[Vector3::AXIS_Y].z); - transform_slider[6]->set_value(tform.get_basis()[Vector3::AXIS_Z].x); - transform_slider[7]->set_value(tform.get_basis()[Vector3::AXIS_Z].y); - transform_slider[8]->set_value(tform.get_basis()[Vector3::AXIS_Z].z); - - for (int i = 0; i < TRANSLATION_COMPONENTS; i++) { - transform_slider[BASIS_COMPONENTS + i]->set_value(tform.get_origin()[i]); - } + translation_property->update_using_vector(translation); + rotation_property->update_using_vector(rotation_degrees); + scale_property->update_using_vector(scale); + transform_property->update_using_transform(tform); update_enabled_checkbox(); updating = false; } BoneTransformEditor::BoneTransformEditor(Skeleton3D *p_skeleton) : - translation_slider(), - rotation_slider(), - scale_slider(), - transform_slider(), skeleton(p_skeleton), key_button(nullptr), enabled_checkbox(nullptr), @@ -397,7 +301,7 @@ void BoneTransformEditor::_key_button_pressed() { return; // Need to normalize the basis before you key it - Transform tform = compute_transform(true); + Transform tform = compute_transform_from_vector3s(); tform.orthonormalize(); AnimationPlayerEditor::singleton->get_track_editor()->insert_transform_key(skeleton, name, tform); } @@ -627,8 +531,7 @@ void Skeleton3DEditor::update_joint_tree() { items.insert(-1, root); const Vector<int> &joint_porder = skeleton->get_bone_process_orders(); - - Ref<Texture> bone_icon = get_theme_icon("Skeleton3D", "EditorIcons"); + Ref<Texture> bone_icon = get_theme_icon("BoneAttachment3D", "EditorIcons"); for (int i = 0; i < joint_porder.size(); ++i) { const int b_idx = joint_porder[i]; @@ -714,11 +617,11 @@ void Skeleton3DEditor::_notification(int p_what) { update_joint_tree(); update_editors(); - get_tree()->connect_compat("node_removed", this, "_node_removed", Vector<Variant>(), Object::CONNECT_ONESHOT); - joint_tree->connect_compat("item_selected", this, "_joint_tree_selection_changed"); - joint_tree->connect_compat("item_rmb_selected", this, "_joint_tree_rmb_select"); + get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Vector<Variant>(), Object::CONNECT_ONESHOT); + joint_tree->connect("item_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_selection_changed)); + joint_tree->connect("item_rmb_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_rmb_select)); #ifdef TOOLS_ENABLED - skeleton->connect_compat("pose_updated", this, "_update_properties"); + skeleton->connect("pose_updated", callable_mp(this, &Skeleton3DEditor::_update_properties)); #endif // TOOLS_ENABLED break; diff --git a/editor/plugins/skeleton_3d_editor_plugin.h b/editor/plugins/skeleton_3d_editor_plugin.h index 8b0639ed92..a5b8ce80a9 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.h +++ b/editor/plugins/skeleton_3d_editor_plugin.h @@ -41,30 +41,19 @@ class PhysicalBone3D; class Skeleton3DEditorPlugin; class Button; class CheckBox; +class EditorPropertyTransform; +class EditorPropertyVector3; class BoneTransformEditor : public VBoxContainer { GDCLASS(BoneTransformEditor, VBoxContainer); - static const int32_t TRANSLATION_COMPONENTS = 3; - static const int32_t ROTATION_DEGREES_COMPONENTS = 3; - static const int32_t SCALE_COMPONENTS = 3; - static const int32_t BASIS_COMPONENTS = 9; - static const int32_t BASIS_SPLIT_COMPONENTS = 3; - static const int32_t TRANSFORM_COMPONENTS = 12; - static const int32_t TRANSFORM_SPLIT_COMPONENTS = 3; - static const int32_t TRANSFORM_CONTROL_COMPONENTS = 3; - EditorInspectorSection *section; - GridContainer *translation_grid; - GridContainer *rotation_grid; - GridContainer *scale_grid; - GridContainer *transform_grid; - - EditorSpinSlider *translation_slider[TRANSLATION_COMPONENTS]; - EditorSpinSlider *rotation_slider[ROTATION_DEGREES_COMPONENTS]; - EditorSpinSlider *scale_slider[SCALE_COMPONENTS]; - EditorSpinSlider *transform_slider[TRANSFORM_COMPONENTS]; + EditorPropertyVector3 *translation_property; + EditorPropertyVector3 *rotation_property; + EditorPropertyVector3 *scale_property; + EditorInspectorSection *transform_section; + EditorPropertyTransform *transform_property; Rect2 background_rects[5]; @@ -83,17 +72,22 @@ class BoneTransformEditor : public VBoxContainer { String label; void create_editors(); - void setup_spinner(EditorSpinSlider *spinner, const bool is_transform_spinner); - void _value_changed(const double p_value, const bool p_from_transform); - - Transform compute_transform(const bool p_from_transform) const; + // Called when one of the EditorSpinSliders are changed. + void _value_changed(const double p_value); + // Called when the one of the EditorPropertyVector3 are updated. + void _value_changed_vector3(const String p_property_name, const Vector3 p_vector, const StringName p_edited_property_name, const bool p_boolean); + // Called when the transform_property is updated. + void _value_changed_transform(const String p_property_name, const Transform p_transform, const StringName p_edited_property_name, const bool p_boolean); + // Changes the transform to the given transform and updates the UI accordingly. + void _change_transform(Transform p_new_transform); + // Creates a Transform using the EditorPropertyVector3 properties. + Transform compute_transform_from_vector3s() const; void update_enabled_checkbox(); protected: void _notification(int p_what); - static void _bind_methods(); public: BoneTransformEditor(Skeleton3D *p_skeleton); diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 859fec1628..7102faf58a 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -873,12 +873,14 @@ SpriteFramesEditor::SpriteFramesEditor() { HBoxContainer *hbc_animlist = memnew(HBoxContainer); sub_vb->add_child(hbc_animlist); - new_anim = memnew(ToolButton); + new_anim = memnew(Button); + new_anim->set_flat(true); new_anim->set_tooltip(TTR("New Animation")); hbc_animlist->add_child(new_anim); new_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_add)); - remove_anim = memnew(ToolButton); + remove_anim = memnew(Button); + remove_anim->set_flat(true); remove_anim->set_tooltip(TTR("Remove Animation")); hbc_animlist->add_child(remove_anim); remove_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_remove)); @@ -913,45 +915,54 @@ SpriteFramesEditor::SpriteFramesEditor() { HBoxContainer *hbc = memnew(HBoxContainer); sub_vb->add_child(hbc); - load = memnew(ToolButton); + load = memnew(Button); + load->set_flat(true); load->set_tooltip(TTR("Add a Texture from File")); hbc->add_child(load); - load_sheet = memnew(ToolButton); + load_sheet = memnew(Button); + load_sheet->set_flat(true); load_sheet->set_tooltip(TTR("Add Frames from a Sprite Sheet")); hbc->add_child(load_sheet); hbc->add_child(memnew(VSeparator)); - copy = memnew(ToolButton); + copy = memnew(Button); + copy->set_flat(true); copy->set_tooltip(TTR("Copy")); hbc->add_child(copy); - paste = memnew(ToolButton); + paste = memnew(Button); + paste->set_flat(true); paste->set_tooltip(TTR("Paste")); hbc->add_child(paste); hbc->add_child(memnew(VSeparator)); - empty = memnew(ToolButton); + empty = memnew(Button); + empty->set_flat(true); empty->set_tooltip(TTR("Insert Empty (Before)")); hbc->add_child(empty); - empty2 = memnew(ToolButton); + empty2 = memnew(Button); + empty2->set_flat(true); empty2->set_tooltip(TTR("Insert Empty (After)")); hbc->add_child(empty2); hbc->add_child(memnew(VSeparator)); - move_up = memnew(ToolButton); + move_up = memnew(Button); + move_up->set_flat(true); move_up->set_tooltip(TTR("Move (Before)")); hbc->add_child(move_up); - move_down = memnew(ToolButton); + move_down = memnew(Button); + move_down->set_flat(true); move_down->set_tooltip(TTR("Move (After)")); hbc->add_child(move_down); - _delete = memnew(ToolButton); + _delete = memnew(Button); + _delete->set_flat(true); _delete->set_tooltip(TTR("Delete")); hbc->add_child(_delete); diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h index 45646eb9e4..c050ae484b 100644 --- a/editor/plugins/sprite_frames_editor_plugin.h +++ b/editor/plugins/sprite_frames_editor_plugin.h @@ -43,22 +43,22 @@ class SpriteFramesEditor : public HSplitContainer { GDCLASS(SpriteFramesEditor, HSplitContainer); - ToolButton *load; - ToolButton *load_sheet; - ToolButton *_delete; - ToolButton *copy; - ToolButton *paste; - ToolButton *empty; - ToolButton *empty2; - ToolButton *move_up; - ToolButton *move_down; + Button *load; + Button *load_sheet; + Button *_delete; + Button *copy; + Button *paste; + Button *empty; + Button *empty2; + Button *move_up; + Button *move_down; ItemList *tree; bool loading_scene; int sel; HSplitContainer *split; - ToolButton *new_anim; - ToolButton *remove_anim; + Button *new_anim; + Button *remove_anim; Tree *animations; SpinBox *anim_speed; diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 9b8b111be5..3a92818779 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -1037,17 +1037,20 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { edit_draw->add_child(zoom_hb); zoom_hb->set_begin(Point2(5, 5)); - zoom_out = memnew(ToolButton); + zoom_out = memnew(Button); + zoom_out->set_flat(true); zoom_out->set_tooltip(TTR("Zoom Out")); zoom_out->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_out)); zoom_hb->add_child(zoom_out); - zoom_reset = memnew(ToolButton); + zoom_reset = memnew(Button); + zoom_reset->set_flat(true); zoom_reset->set_tooltip(TTR("Zoom Reset")); zoom_reset->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_reset)); zoom_hb->add_child(zoom_reset); - zoom_in = memnew(ToolButton); + zoom_in = memnew(Button); + zoom_in->set_flat(true); zoom_in->set_tooltip(TTR("Zoom In")); zoom_in->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_in)); zoom_hb->add_child(zoom_in); diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h index 93da23fd50..8991603c0f 100644 --- a/editor/plugins/texture_region_editor_plugin.h +++ b/editor/plugins/texture_region_editor_plugin.h @@ -56,9 +56,9 @@ class TextureRegionEditor : public VBoxContainer { friend class TextureRegionEditorPlugin; OptionButton *snap_mode_button; - ToolButton *zoom_in; - ToolButton *zoom_reset; - ToolButton *zoom_out; + Button *zoom_in; + Button *zoom_reset; + Button *zoom_out; HBoxContainer *hb_grid; //For showing/hiding the grid controls when changing the SnapMode SpinBox *sb_step_y; SpinBox *sb_step_x; diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index eb028659fd..43ace737c0 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -672,8 +672,9 @@ ThemeEditor::ThemeEditor() { bt->set_text(TTR("Disabled Button")); bt->set_disabled(true); first_vb->add_child(bt); - ToolButton *tb = memnew(ToolButton); - tb->set_text("ToolButton"); + Button *tb = memnew(Button); + tb->set_flat(true); + tb->set_text("Button"); first_vb->add_child(tb); CheckButton *cb = memnew(CheckButton); diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 3281a59c1c..158f9e8587 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -91,7 +91,7 @@ void TileMapEditor::_notification(int p_what) { } void TileMapEditor::_update_button_tool() { - ToolButton *tb[4] = { paint_button, bucket_fill_button, picker_button, select_button }; + Button *tb[4] = { paint_button, bucket_fill_button, picker_button, select_button }; // Unpress all buttons for (int i = 0; i < 4; i++) { tb[i]->set_pressed(false); @@ -1959,26 +1959,30 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { toolbar->add_child(memnew(VSeparator)); // Tools. - paint_button = memnew(ToolButton); + paint_button = memnew(Button); + paint_button->set_flat(true); paint_button->set_shortcut(ED_SHORTCUT("tile_map_editor/paint_tile", TTR("Paint Tile"), KEY_P)); paint_button->set_tooltip(TTR("Shift+LMB: Line Draw\nShift+Ctrl+LMB: Rectangle Paint")); paint_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_NONE)); paint_button->set_toggle_mode(true); toolbar->add_child(paint_button); - bucket_fill_button = memnew(ToolButton); + bucket_fill_button = memnew(Button); + bucket_fill_button->set_flat(true); bucket_fill_button->set_shortcut(ED_SHORTCUT("tile_map_editor/bucket_fill", TTR("Bucket Fill"), KEY_B)); bucket_fill_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_BUCKET)); bucket_fill_button->set_toggle_mode(true); toolbar->add_child(bucket_fill_button); - picker_button = memnew(ToolButton); + picker_button = memnew(Button); + picker_button->set_flat(true); picker_button->set_shortcut(ED_SHORTCUT("tile_map_editor/pick_tile", TTR("Pick Tile"), KEY_I)); picker_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_PICKING)); picker_button->set_toggle_mode(true); toolbar->add_child(picker_button); - select_button = memnew(ToolButton); + select_button = memnew(Button); + select_button->set_flat(true); select_button->set_shortcut(ED_SHORTCUT("tile_map_editor/select", TTR("Select"), KEY_M)); select_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_SELECTING)); select_button->set_toggle_mode(true); @@ -2017,35 +2021,40 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { p->add_item(TTR("Fix Invalid Tiles"), OPTION_FIX_INVALID); p->connect("id_pressed", callable_mp(this, &TileMapEditor::_menu_option)); - rotate_left_button = memnew(ToolButton); + rotate_left_button = memnew(Button); + rotate_left_button->set_flat(true); rotate_left_button->set_tooltip(TTR("Rotate Left")); rotate_left_button->set_focus_mode(FOCUS_NONE); rotate_left_button->connect("pressed", callable_mp(this, &TileMapEditor::_rotate), varray(-1)); rotate_left_button->set_shortcut(ED_SHORTCUT("tile_map_editor/rotate_left", TTR("Rotate Left"), KEY_A)); tool_hb->add_child(rotate_left_button); - rotate_right_button = memnew(ToolButton); + rotate_right_button = memnew(Button); + rotate_right_button->set_flat(true); rotate_right_button->set_tooltip(TTR("Rotate Right")); rotate_right_button->set_focus_mode(FOCUS_NONE); rotate_right_button->connect("pressed", callable_mp(this, &TileMapEditor::_rotate), varray(1)); rotate_right_button->set_shortcut(ED_SHORTCUT("tile_map_editor/rotate_right", TTR("Rotate Right"), KEY_S)); tool_hb->add_child(rotate_right_button); - flip_horizontal_button = memnew(ToolButton); + flip_horizontal_button = memnew(Button); + flip_horizontal_button->set_flat(true); flip_horizontal_button->set_tooltip(TTR("Flip Horizontally")); flip_horizontal_button->set_focus_mode(FOCUS_NONE); flip_horizontal_button->connect("pressed", callable_mp(this, &TileMapEditor::_flip_horizontal)); flip_horizontal_button->set_shortcut(ED_SHORTCUT("tile_map_editor/flip_horizontal", TTR("Flip Horizontally"), KEY_X)); tool_hb->add_child(flip_horizontal_button); - flip_vertical_button = memnew(ToolButton); + flip_vertical_button = memnew(Button); + flip_vertical_button->set_flat(true); flip_vertical_button->set_tooltip(TTR("Flip Vertically")); flip_vertical_button->set_focus_mode(FOCUS_NONE); flip_vertical_button->connect("pressed", callable_mp(this, &TileMapEditor::_flip_vertical)); flip_vertical_button->set_shortcut(ED_SHORTCUT("tile_map_editor/flip_vertical", TTR("Flip Vertically"), KEY_Z)); tool_hb->add_child(flip_vertical_button); - clear_transform_button = memnew(ToolButton); + clear_transform_button = memnew(Button); + clear_transform_button->set_flat(true); clear_transform_button->set_tooltip(TTR("Clear Transform")); clear_transform_button->set_focus_mode(FOCUS_NONE); clear_transform_button->connect("pressed", callable_mp(this, &TileMapEditor::_clear_transform)); diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h index e25e2d2add..1d2ecdb61f 100644 --- a/editor/plugins/tile_map_editor_plugin.h +++ b/editor/plugins/tile_map_editor_plugin.h @@ -38,7 +38,6 @@ #include "scene/gui/label.h" #include "scene/gui/line_edit.h" #include "scene/gui/menu_button.h" -#include "scene/gui/tool_button.h" class TileMapEditor : public VBoxContainer { GDCLASS(TileMapEditor, VBoxContainer); @@ -88,16 +87,16 @@ class TileMapEditor : public VBoxContainer { Label *tile_info; MenuButton *options; - ToolButton *paint_button; - ToolButton *bucket_fill_button; - ToolButton *picker_button; - ToolButton *select_button; + Button *paint_button; + Button *bucket_fill_button; + Button *picker_button; + Button *select_button; - ToolButton *flip_horizontal_button; - ToolButton *flip_vertical_button; - ToolButton *rotate_left_button; - ToolButton *rotate_right_button; - ToolButton *clear_transform_button; + Button *flip_horizontal_button; + Button *flip_vertical_button; + Button *rotate_left_button; + Button *rotate_right_button; + Button *clear_transform_button; CheckBox *manual_button; CheckBox *priority_button; diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index b3d4b391d3..a37cf7e426 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -341,12 +341,12 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { HBoxContainer *tileset_toolbar_container = memnew(HBoxContainer); left_container->add_child(tileset_toolbar_container); - tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE] = memnew(ToolButton); + tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE] = memnew(Button); tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tileset_toolbar_button_pressed), varray(TOOL_TILESET_ADD_TEXTURE)); tileset_toolbar_container->add_child(tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]); tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->set_tooltip(TTR("Add Texture(s) to TileSet.")); - tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE] = memnew(ToolButton); + tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE] = memnew(Button); tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tileset_toolbar_button_pressed), varray(TOOL_TILESET_REMOVE_TEXTURE)); tileset_toolbar_container->add_child(tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]); tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->set_tooltip(TTR("Remove selected Texture from TileSet.")); @@ -402,13 +402,13 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { tool_hb->add_child(spacer); tool_hb->move_child(spacer, WORKSPACE_CREATE_SINGLE); - tools[SELECT_NEXT] = memnew(ToolButton); + tools[SELECT_NEXT] = memnew(Button); tool_hb->add_child(tools[SELECT_NEXT]); tool_hb->move_child(tools[SELECT_NEXT], WORKSPACE_CREATE_SINGLE); tools[SELECT_NEXT]->set_shortcut(ED_SHORTCUT("tileset_editor/next_shape", TTR("Next Coordinate"), KEY_PAGEDOWN)); tools[SELECT_NEXT]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SELECT_NEXT)); tools[SELECT_NEXT]->set_tooltip(TTR("Select the next shape, subtile, or Tile.")); - tools[SELECT_PREVIOUS] = memnew(ToolButton); + tools[SELECT_PREVIOUS] = memnew(Button); tool_hb->add_child(tools[SELECT_PREVIOUS]); tool_hb->move_child(tools[SELECT_PREVIOUS], WORKSPACE_CREATE_SINGLE); tools[SELECT_PREVIOUS]->set_shortcut(ED_SHORTCUT("tileset_editor/previous_shape", TTR("Previous Coordinate"), KEY_PAGEUP)); @@ -465,7 +465,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { toolbar = memnew(HBoxContainer); Ref<ButtonGroup> tg(memnew(ButtonGroup)); - tools[TOOL_SELECT] = memnew(ToolButton); + tools[TOOL_SELECT] = memnew(Button); toolbar->add_child(tools[TOOL_SELECT]); tools[TOOL_SELECT]->set_toggle_mode(true); tools[TOOL_SELECT]->set_button_group(tg); @@ -474,40 +474,42 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { separator_bitmask = memnew(VSeparator); toolbar->add_child(separator_bitmask); - tools[BITMASK_COPY] = memnew(ToolButton); + tools[BITMASK_COPY] = memnew(Button); tools[BITMASK_COPY]->set_tooltip(TTR("Copy bitmask.")); tools[BITMASK_COPY]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(BITMASK_COPY)); toolbar->add_child(tools[BITMASK_COPY]); - tools[BITMASK_PASTE] = memnew(ToolButton); + tools[BITMASK_PASTE] = memnew(Button); tools[BITMASK_PASTE]->set_tooltip(TTR("Paste bitmask.")); tools[BITMASK_PASTE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(BITMASK_PASTE)); toolbar->add_child(tools[BITMASK_PASTE]); - tools[BITMASK_CLEAR] = memnew(ToolButton); + tools[BITMASK_CLEAR] = memnew(Button); tools[BITMASK_CLEAR]->set_tooltip(TTR("Erase bitmask.")); tools[BITMASK_CLEAR]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(BITMASK_CLEAR)); toolbar->add_child(tools[BITMASK_CLEAR]); - tools[SHAPE_NEW_RECTANGLE] = memnew(ToolButton); + tools[SHAPE_NEW_RECTANGLE] = memnew(Button); toolbar->add_child(tools[SHAPE_NEW_RECTANGLE]); tools[SHAPE_NEW_RECTANGLE]->set_toggle_mode(true); tools[SHAPE_NEW_RECTANGLE]->set_button_group(tg); tools[SHAPE_NEW_RECTANGLE]->set_tooltip(TTR("Create a new rectangle.")); + tools[SHAPE_NEW_RECTANGLE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SHAPE_NEW_RECTANGLE)); - tools[SHAPE_NEW_POLYGON] = memnew(ToolButton); + tools[SHAPE_NEW_POLYGON] = memnew(Button); toolbar->add_child(tools[SHAPE_NEW_POLYGON]); tools[SHAPE_NEW_POLYGON]->set_toggle_mode(true); tools[SHAPE_NEW_POLYGON]->set_button_group(tg); tools[SHAPE_NEW_POLYGON]->set_tooltip(TTR("Create a new polygon.")); + tools[SHAPE_NEW_POLYGON]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SHAPE_NEW_POLYGON)); separator_shape_toggle = memnew(VSeparator); toolbar->add_child(separator_shape_toggle); - tools[SHAPE_TOGGLE_TYPE] = memnew(ToolButton); + tools[SHAPE_TOGGLE_TYPE] = memnew(Button); tools[SHAPE_TOGGLE_TYPE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SHAPE_TOGGLE_TYPE)); toolbar->add_child(tools[SHAPE_TOGGLE_TYPE]); separator_delete = memnew(VSeparator); toolbar->add_child(separator_delete); - tools[SHAPE_DELETE] = memnew(ToolButton); + tools[SHAPE_DELETE] = memnew(Button); tools[SHAPE_DELETE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SHAPE_DELETE)); toolbar->add_child(tools[SHAPE_DELETE]); @@ -531,12 +533,12 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { separator_grid = memnew(VSeparator); toolbar->add_child(separator_grid); - tools[SHAPE_KEEP_INSIDE_TILE] = memnew(ToolButton); + tools[SHAPE_KEEP_INSIDE_TILE] = memnew(Button); tools[SHAPE_KEEP_INSIDE_TILE]->set_toggle_mode(true); tools[SHAPE_KEEP_INSIDE_TILE]->set_pressed(true); tools[SHAPE_KEEP_INSIDE_TILE]->set_tooltip(TTR("Keep polygon inside region Rect.")); toolbar->add_child(tools[SHAPE_KEEP_INSIDE_TILE]); - tools[TOOL_GRID_SNAP] = memnew(ToolButton); + tools[TOOL_GRID_SNAP] = memnew(Button); tools[TOOL_GRID_SNAP]->set_toggle_mode(true); tools[TOOL_GRID_SNAP]->set_tooltip(TTR("Enable snap and show grid (configurable via the Inspector).")); tools[TOOL_GRID_SNAP]->connect("toggled", callable_mp(this, &TileSetEditor::_on_grid_snap_toggled)); @@ -546,20 +548,20 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { separator->set_h_size_flags(SIZE_EXPAND_FILL); toolbar->add_child(separator); - tools[ZOOM_OUT] = memnew(ToolButton); + tools[ZOOM_OUT] = memnew(Button); tools[ZOOM_OUT]->connect("pressed", callable_mp(this, &TileSetEditor::_zoom_out)); toolbar->add_child(tools[ZOOM_OUT]); tools[ZOOM_OUT]->set_tooltip(TTR("Zoom Out")); - tools[ZOOM_1] = memnew(ToolButton); + tools[ZOOM_1] = memnew(Button); tools[ZOOM_1]->connect("pressed", callable_mp(this, &TileSetEditor::_zoom_reset)); toolbar->add_child(tools[ZOOM_1]); tools[ZOOM_1]->set_tooltip(TTR("Zoom Reset")); - tools[ZOOM_IN] = memnew(ToolButton); + tools[ZOOM_IN] = memnew(Button); tools[ZOOM_IN]->connect("pressed", callable_mp(this, &TileSetEditor::_zoom_in)); toolbar->add_child(tools[ZOOM_IN]); tools[ZOOM_IN]->set_tooltip(TTR("Zoom In")); - tools[VISIBLE_INFO] = memnew(ToolButton); + tools[VISIBLE_INFO] = memnew(Button); tools[VISIBLE_INFO]->set_toggle_mode(true); tools[VISIBLE_INFO]->set_tooltip(TTR("Display Tile Names (Hold Alt Key)")); toolbar->add_child(tools[VISIBLE_INFO]); @@ -1908,7 +1910,7 @@ void TileSetEditor::_on_tool_clicked(int p_tool) { } } } - } else if (p_tool == TOOL_SELECT) { + } else if (p_tool == TOOL_SELECT || p_tool == SHAPE_NEW_POLYGON || p_tool == SHAPE_NEW_RECTANGLE) { if (creating_shape) { // Cancel Creation creating_shape = false; diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h index 2955dda244..d2687e7a4b 100644 --- a/editor/plugins/tile_set_editor_plugin.h +++ b/editor/plugins/tile_set_editor_plugin.h @@ -46,7 +46,7 @@ class TileSetEditor : public HSplitContainer { GDCLASS(TileSetEditor, HSplitContainer); - enum TextureToolButtons { + enum TextureButtons { TOOL_TILESET_ADD_TEXTURE, TOOL_TILESET_REMOVE_TEXTURE, TOOL_TILESET_CREATE_SCENE, @@ -111,7 +111,7 @@ class TileSetEditor : public HSplitContainer { ItemList *texture_list; int option; - ToolButton *tileset_toolbar_buttons[TOOL_TILESET_MAX]; + Button *tileset_toolbar_buttons[TOOL_TILESET_MAX]; MenuButton *tileset_toolbar_tools; Map<RID, Ref<Texture2D>> texture_map; @@ -146,7 +146,7 @@ class TileSetEditor : public HSplitContainer { Button *tool_editmode[EDITMODE_MAX]; HSeparator *separator_editmode; HBoxContainer *toolbar; - ToolButton *tools[TOOL_MAX]; + Button *tools[TOOL_MAX]; VSeparator *separator_shape_toggle; VSeparator *separator_bitmask; VSeparator *separator_delete; diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index a1436e123d..cfbe54ef61 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -300,7 +300,7 @@ void VersionControlEditorPlugin::register_editor() { TabContainer *dock_vbc = (TabContainer *)version_commit_dock->get_parent_control(); dock_vbc->set_tab_title(version_commit_dock->get_index(), TTR("Commit")); - ToolButton *vc = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Version Control"), version_control_dock); + Button *vc = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Version Control"), version_control_dock); set_version_control_tool_button(vc); } } diff --git a/editor/plugins/version_control_editor_plugin.h b/editor/plugins/version_control_editor_plugin.h index 664e38d65f..248a1435fd 100644 --- a/editor/plugins/version_control_editor_plugin.h +++ b/editor/plugins/version_control_editor_plugin.h @@ -90,7 +90,7 @@ private: Label *commit_status; PanelContainer *version_control_dock; - ToolButton *version_control_dock_button; + Button *version_control_dock_button; VBoxContainer *diff_vbc; HBoxContainer *diff_hbc; Button *diff_refresh_button; @@ -121,7 +121,7 @@ public: static VersionControlEditorPlugin *get_singleton(); void popup_vcs_set_up_dialog(const Control *p_gui_base); - void set_version_control_tool_button(ToolButton *p_button) { version_control_dock_button = p_button; } + void set_version_control_tool_button(Button *p_button) { version_control_dock_button = p_button; } PopupMenu *get_version_control_actions_panel() const { return version_control_actions; } VBoxContainer *get_version_commit_dock() const { return version_commit_dock; } diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 92bdba93e7..89ab747cde 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -2341,13 +2341,15 @@ VisualShaderEditor::VisualShaderEditor() { graph->get_zoom_hbox()->add_child(edit_type); graph->get_zoom_hbox()->move_child(edit_type, 0); - add_node = memnew(ToolButton); + add_node = memnew(Button); + add_node->set_flat(true); graph->get_zoom_hbox()->add_child(add_node); add_node->set_text(TTR("Add Node...")); graph->get_zoom_hbox()->move_child(add_node, 0); add_node->connect("pressed", callable_mp(this, &VisualShaderEditor::_show_members_dialog), varray(false)); - preview_shader = memnew(ToolButton); + preview_shader = memnew(Button); + preview_shader->set_flat(true); preview_shader->set_toggle_mode(true); preview_shader->set_tooltip(TTR("Show resulted shader code.")); graph->get_zoom_hbox()->add_child(preview_shader); @@ -2750,8 +2752,10 @@ VisualShaderEditor::VisualShaderEditor() { texture_node_option_idx = add_options.size(); add_options.push_back(AddOption("Texture2D", "Textures", "Functions", "VisualShaderNodeTexture", TTR("Perform the texture lookup."), -1, -1)); add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubemapUniform", TTR("Cubic texture uniform lookup."), -1, -1)); + add_options.push_back(AddOption("Texture2DArray", "Textures", "Functions", "VisualShaderNodeTexture2DArray", TTR("Perform the 2D-array texture lookup."), -1, -1, -1, -1, -1)); add_options.push_back(AddOption("TextureUniform", "Textures", "Variables", "VisualShaderNodeTextureUniform", TTR("2D texture uniform lookup."), -1, -1)); add_options.push_back(AddOption("TextureUniformTriplanar", "Textures", "Variables", "VisualShaderNodeTextureUniformTriplanar", TTR("2D texture uniform lookup with triplanar."), -1, -1, VisualShader::TYPE_FRAGMENT | VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Texture2DArrayUniform", "Textures", "Variables", "VisualShaderNodeTexture2DArrayUniform", TTR("2D array of textures uniform lookup."), -1, -1, -1, -1, -1)); // TRANSFORM diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index d2f10d9407..b7c0fb8e45 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -60,8 +60,8 @@ class VisualShaderEditor : public VBoxContainer { Ref<VisualShader> visual_shader; HSplitContainer *main_box; GraphEdit *graph; - ToolButton *add_node; - ToolButton *preview_shader; + Button *add_node; + Button *preview_shader; OptionButton *edit_type; diff --git a/editor/project_export.cpp b/editor/project_export.cpp index c53a59604a..67ab925a4f 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -1064,10 +1064,12 @@ ProjectExportDialog::ProjectExportDialog() { //presets->set_drag_forwarding(this); mc->add_child(presets); presets->connect("item_selected", callable_mp(this, &ProjectExportDialog::_edit_preset)); - duplicate_preset = memnew(ToolButton); + duplicate_preset = memnew(Button); + duplicate_preset->set_flat(true); preset_hb->add_child(duplicate_preset); duplicate_preset->connect("pressed", callable_mp(this, &ProjectExportDialog::_duplicate_preset)); - delete_preset = memnew(ToolButton); + delete_preset = memnew(Button); + delete_preset->set_flat(true); preset_hb->add_child(delete_preset); delete_preset->connect("pressed", callable_mp(this, &ProjectExportDialog::_delete_preset)); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index cbba4b4834..a800f9e8eb 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -50,7 +50,6 @@ #include "scene/gui/panel_container.h" #include "scene/gui/separator.h" #include "scene/gui/texture_rect.h" -#include "scene/gui/tool_button.h" #include "scene/main/window.h" #include "servers/display_server.h" diff --git a/editor/project_manager.h b/editor/project_manager.h index e5471bd392..66b38d0746 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -35,7 +35,6 @@ #include "scene/gui/dialogs.h" #include "scene/gui/file_dialog.h" #include "scene/gui/scroll_container.h" -#include "scene/gui/tool_button.h" #include "scene/gui/tree.h" class ProjectDialog; diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index a7c260c0f8..a8029e1e2b 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -1865,14 +1865,15 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { restart_icon->set_v_size_flags(Control::SIZE_SHRINK_CENTER); restart_hb->add_child(restart_icon); restart_label = memnew(Label); - restart_label->set_text(TTR("The editor must be restarted for changes to take effect.")); + restart_label->set_text(TTR("Changed settings will be applied to the editor after restarting.")); restart_hb->add_child(restart_label); restart_hb->add_spacer(); Button *restart_button = memnew(Button); restart_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_editor_restart)); restart_hb->add_child(restart_button); restart_button->set_text(TTR("Save & Restart")); - restart_close_button = memnew(ToolButton); + restart_close_button = memnew(Button); + restart_close_button->set_flat(true); restart_close_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_editor_restart_close)); restart_hb->add_child(restart_close_button); restart_container->hide(); diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h index 445ef58351..728f31efa8 100644 --- a/editor/project_settings_editor.h +++ b/editor/project_settings_editor.h @@ -174,7 +174,7 @@ class ProjectSettingsEditor : public AcceptDialog { Label *restart_label; TextureRect *restart_icon; PanelContainer *restart_container; - ToolButton *restart_close_button; + Button *restart_close_button; void _editor_restart_request(); void _editor_restart(); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 5795d85e66..dd42ed9760 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1076,7 +1076,8 @@ void SceneTreeDock::_notification(int p_what) { top_row->add_child(memnew(Label(TTR("Create Root Node:")))); top_row->add_spacer(); - ToolButton *node_shortcuts_toggle = memnew(ToolButton); + Button *node_shortcuts_toggle = memnew(Button); + node_shortcuts_toggle->set_flat(true); node_shortcuts_toggle->set_name("NodeShortcutsToggle"); node_shortcuts_toggle->set_icon(get_theme_icon("Favorites", "EditorIcons")); node_shortcuts_toggle->set_toggle_mode(true); @@ -2801,13 +2802,15 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel ED_SHORTCUT("scene_tree/delete_no_confirm", TTR("Delete (No Confirm)"), KEY_MASK_SHIFT | KEY_DELETE); ED_SHORTCUT("scene_tree/delete", TTR("Delete"), KEY_DELETE); - button_add = memnew(ToolButton); + button_add = memnew(Button); + button_add->set_flat(true); button_add->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_NEW, false)); button_add->set_tooltip(TTR("Add/Create a New Node.")); button_add->set_shortcut(ED_GET_SHORTCUT("scene_tree/add_child_node")); filter_hbc->add_child(button_add); - button_instance = memnew(ToolButton); + button_instance = memnew(Button); + button_instance->set_flat(true); button_instance->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_INSTANCE, false)); button_instance->set_tooltip(TTR("Instance a scene file as a Node. Creates an inherited scene if no root node exists.")); button_instance->set_shortcut(ED_GET_SHORTCUT("scene_tree/instance_scene")); @@ -2821,14 +2824,16 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel filter->add_theme_constant_override("minimum_spaces", 0); filter->connect("text_changed", callable_mp(this, &SceneTreeDock::_filter_changed)); - button_create_script = memnew(ToolButton); + button_create_script = memnew(Button); + button_create_script->set_flat(true); button_create_script->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_ATTACH_SCRIPT, false)); button_create_script->set_tooltip(TTR("Attach a new or existing script to the selected node.")); button_create_script->set_shortcut(ED_GET_SHORTCUT("scene_tree/attach_script")); filter_hbc->add_child(button_create_script); button_create_script->hide(); - button_detach_script = memnew(ToolButton); + button_detach_script = memnew(Button); + button_detach_script->set_flat(true); button_detach_script->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_DETACH_SCRIPT, false)); button_detach_script->set_tooltip(TTR("Detach the script from the selected node.")); button_detach_script->set_shortcut(ED_GET_SHORTCUT("scene_tree/detach_script")); @@ -2838,14 +2843,16 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel button_hb = memnew(HBoxContainer); vbc->add_child(button_hb); - edit_remote = memnew(ToolButton); + edit_remote = memnew(Button); + edit_remote->set_flat(true); button_hb->add_child(edit_remote); edit_remote->set_h_size_flags(SIZE_EXPAND_FILL); edit_remote->set_text(TTR("Remote")); edit_remote->set_toggle_mode(true); edit_remote->connect("pressed", callable_mp(this, &SceneTreeDock::_remote_tree_selected)); - edit_local = memnew(ToolButton); + edit_local = memnew(Button); + edit_local->set_flat(true); button_hb->add_child(edit_local); edit_local->set_h_size_flags(SIZE_EXPAND_FILL); edit_local->set_text(TTR("Local")); diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 72be3fb02f..150c1976ef 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -46,7 +46,6 @@ #include "scene/gui/control.h" #include "scene/gui/label.h" #include "scene/gui/popup_menu.h" -#include "scene/gui/tool_button.h" #include "scene/gui/tree.h" #include "scene_tree_editor.h" @@ -106,15 +105,15 @@ class SceneTreeDock : public VBoxContainer { CreateDialog *create_dialog; RenameDialog *rename_dialog; - ToolButton *button_add; - ToolButton *button_instance; - ToolButton *button_create_script; - ToolButton *button_detach_script; + Button *button_add; + Button *button_instance; + Button *button_create_script; + Button *button_detach_script; Button *button_3d; HBoxContainer *button_hb; - ToolButton *edit_local, *edit_remote; + Button *edit_local, *edit_remote; SceneTreeEditor *scene_tree; Control *remote_tree; diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index c461bf0410..9f286bd8f6 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -432,7 +432,8 @@ EditorSettingsDialog::EditorSettingsDialog() { restart_button->connect("pressed", callable_mp(this, &EditorSettingsDialog::_editor_restart)); restart_hb->add_child(restart_button); restart_button->set_text(TTR("Save & Restart")); - restart_close_button = memnew(ToolButton); + restart_close_button = memnew(Button); + restart_close_button->set_flat(true); restart_close_button->connect("pressed", callable_mp(this, &EditorSettingsDialog::_editor_restart_close)); restart_hb->add_child(restart_close_button); restart_container->hide(); diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h index 05566762fc..19fe1a7633 100644 --- a/editor/settings_config_dialog.h +++ b/editor/settings_config_dialog.h @@ -38,7 +38,6 @@ #include "scene/gui/rich_text_label.h" #include "scene/gui/tab_container.h" #include "scene/gui/texture_rect.h" -#include "scene/gui/tool_button.h" class EditorSettingsDialog : public AcceptDialog { GDCLASS(EditorSettingsDialog, AcceptDialog); @@ -94,7 +93,7 @@ class EditorSettingsDialog : public AcceptDialog { Label *restart_label; TextureRect *restart_icon; PanelContainer *restart_container; - ToolButton *restart_close_button; + Button *restart_close_button; void _editor_restart_request(); void _editor_restart(); diff --git a/editor/translations/af.po b/editor/translations/af.po index 1f598ef5e5..daa0737106 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -784,6 +784,11 @@ msgstr "Metode in teiken Nodus moet gespesifiseer word!" #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Metode in teiken Nodus moet gespesifiseer word!" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ar.po b/editor/translations/ar.po index a60de1a41e..ffab95cc8b 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -785,6 +785,11 @@ msgid "Method in target node must be specified." msgstr "يجب تحديد الدالة في العقدة المستهدفة." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "هذا الاسم ليس مُعرفاً مميزاً صالحاً:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/bg.po b/editor/translations/bg.po index f08f2b1362..c9f38d518a 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -746,6 +746,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 3680e4ce6c..c438934246 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -809,6 +809,11 @@ msgstr "নির্দেশিত নোডের মেথড নির্দ #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "নামটি কার্যকর সনাক্তকারী নয়:" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ca.po b/editor/translations/ca.po index 1640367701..5fb91db7b4 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -765,6 +765,11 @@ msgid "Method in target node must be specified." msgstr "S'ha d'especificar el mètode al node de destinació." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "El nom no és un identificador vàlid:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/cs.po b/editor/translations/cs.po index fabec77283..809bc69149 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-06-06 10:15+0000\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" "Last-Translator: Zbyněk <zbynek.fiala@gmail.com>\n" "Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/" "cs/>\n" @@ -33,7 +33,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -773,6 +773,11 @@ msgid "Method in target node must be specified." msgstr "Je nutné zadat metodu v cílovém uzlu." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Jméno není platný identifikátor:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -10055,7 +10060,7 @@ msgstr "Přidat akci" #: editor/project_settings_editor.cpp msgid "Button" -msgstr "Tlačítko" +msgstr "Button" #: editor/project_settings_editor.cpp msgid "Left Button." diff --git a/editor/translations/da.po b/editor/translations/da.po index 8eeaaafaea..70b05c08ff 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -16,12 +16,13 @@ # Kristoffer Andersen <kjaa@google.com>, 2019. # Joe Osborne <reachjoe.o@gmail.com>, 2020. # Autowinto <happymansi@hotmail.com>, 2020. +# Mikkel Mouridsen <mikkelmouridsen@me.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-02-02 08:51+0000\n" -"Last-Translator: Autowinto <happymansi@hotmail.com>\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" +"Last-Translator: Mikkel Mouridsen <mikkelmouridsen@me.com>\n" "Language-Team: Danish <https://hosted.weblate.org/projects/godot-engine/" "godot/da/>\n" "Language: da\n" @@ -29,7 +30,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.11-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -443,7 +444,7 @@ msgstr "Det er ikke muligt at tilføje et nyt spor uden en rod" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "" +msgstr "Ugyldigt spor for Bezier (ingen passende underegenskaber)" #: editor/animation_track_editor.cpp #, fuzzy @@ -785,7 +786,7 @@ msgstr "Advarsler" #: editor/code_editor.cpp msgid "Line and column numbers." -msgstr "" +msgstr "Linje- og kolonnenumre." #: editor/connections_dialog.cpp #, fuzzy @@ -794,6 +795,11 @@ msgstr "Metode i target Node skal angives!" #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Navnet er ikke et gyldigt id:" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -1252,7 +1258,7 @@ msgstr "Udpakker Aktiver" #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "The following files failed extraction from package:" -msgstr "" +msgstr "De følgende filer kunne ikke trækkes ud af pakken:" #: editor/editor_asset_installer.cpp #, fuzzy diff --git a/editor/translations/de.po b/editor/translations/de.po index b52206e56e..6fb1a29c12 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -806,6 +806,11 @@ msgid "Method in target node must be specified." msgstr "Methode des Ziel-Nodes muss angegeben werden." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Name ist kein gültiger Bezeichner:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index 4dca7e4c5f..01121a8156 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -730,6 +730,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/el.po b/editor/translations/el.po index 127da8ec1f..3f04c4cf01 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -763,6 +763,11 @@ msgid "Method in target node must be specified." msgstr "Πρέπει να οριστεί συνάρτηση στον στοχευμένο κόμβο." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Το όνομα δεν είναι έγκυρο αναγνωριστικό:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/eo.po b/editor/translations/eo.po index 3addde45ce..f98f043118 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -764,6 +764,11 @@ msgstr "Metodo en celo nodo devas esti specifita." #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Metodo en celo nodo devas esti specifita." + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/es.po b/editor/translations/es.po index f8c4134d07..15efa44f3d 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -53,8 +53,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-06-15 01:48+0000\n" -"Last-Translator: paco <pacosoftfree@protonmail.com>\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" +"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" "Language: es\n" @@ -62,7 +62,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -79,7 +79,8 @@ msgstr "Se esperaba un string de longitud 1 (un carácter)." #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Not enough bytes for decoding bytes, or invalid format." msgstr "" -"No hay suficientes bytes para decodificar bytes, o el formato es invalido." +"No hay suficientes bytes para decodificar los bytes, o el formato es " +"inválido." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -96,11 +97,11 @@ msgstr "Operandos inválidos para el operador %s, %s y %s." #: core/math/expression.cpp msgid "Invalid index of type %s for base type %s" -msgstr "Indice inválido de tipo %s para tipo base %s" +msgstr "Índice inválido de tipo %s para el tipo base %s" #: core/math/expression.cpp msgid "Invalid named index '%s' for base type %s" -msgstr "El índice de nombre «%s» no es válido para el tipo de base %s" +msgstr "El índice de nombre '%s' no es válido para el tipo de base %s" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" @@ -806,6 +807,11 @@ msgid "Method in target node must be specified." msgstr "Se debe establecer un método en el nodo destino." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "El nombre no es un identificador válido:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -2014,7 +2020,7 @@ msgstr "Propiedades del Tema" #: editor/editor_help.cpp msgid "Enumerations" -msgstr "Enumeraciones" +msgstr "Enumerados" #: editor/editor_help.cpp msgid "Constants" @@ -3378,7 +3384,7 @@ msgstr "Página: " #: editor/editor_properties_array_dict.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Item" -msgstr "Eliminar Item" +msgstr "Eliminar Ítem" #: editor/editor_properties_array_dict.cpp msgid "New Key:" @@ -5906,15 +5912,15 @@ msgstr "Degradado Editado" #: editor/plugins/item_list_editor_plugin.cpp msgid "Item %d" -msgstr "Elemento %d" +msgstr "Ítem %d" #: editor/plugins/item_list_editor_plugin.cpp msgid "Items" -msgstr "Elementos" +msgstr "Ítems" #: editor/plugins/item_list_editor_plugin.cpp msgid "Item List Editor" -msgstr "Editor de Lista de Items" +msgstr "Editor de Lista de Ítems" #: editor/plugins/light_occluder_2d_editor_plugin.cpp msgid "Create Occluder Polygon" @@ -6104,7 +6110,7 @@ msgstr "Depuración del Canal UV" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Remove item %d?" -msgstr "¿Quieres borrar el elemento %d?" +msgstr "¿Eliminar el ítem %d?" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "" @@ -6121,11 +6127,11 @@ msgstr "Librería de Mallas" #: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Add Item" -msgstr "Añadir Item" +msgstr "Añadir Ítem" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Remove Selected Item" -msgstr "Borrar elemento seleccionado" +msgstr "Eliminar Ítem Seleccionado" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import from Scene" @@ -7935,7 +7941,7 @@ msgstr "Región de Textura" #: editor/plugins/theme_editor_plugin.cpp msgid "Add All Items" -msgstr "Añadir Todos los Elementos" +msgstr "Añadir Todos los Ítems" #: editor/plugins/theme_editor_plugin.cpp msgid "Add All" @@ -7959,11 +7965,11 @@ msgstr "Menú de edición de tema." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Class Items" -msgstr "Añadir elementos de clase" +msgstr "Añadir Clases de Ítems" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" -msgstr "Eliminar Ítems de Clases" +msgstr "Eliminar Clases de Ítems" #: editor/plugins/theme_editor_plugin.cpp msgid "Create Empty Template" @@ -11146,7 +11152,7 @@ msgstr "Monitores" #: editor/script_editor_debugger.cpp msgid "Pick one or more items from the list to display the graph." -msgstr "Elige uno o más elementos de la lista para mostrar el gráfico." +msgstr "Elige uno o más ítems de la lista para mostrar el gráfico." #: editor/script_editor_debugger.cpp msgid "List of Video Memory Usage by Resource:" diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index 46cb219e14..5cab610261 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -770,6 +770,11 @@ msgid "Method in target node must be specified." msgstr "El método en el nodo objetivo debe ser especificado." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "El nombre no es un identificador válido:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/et.po b/editor/translations/et.po index 7be6996d69..5fd61347e1 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -744,6 +744,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/eu.po b/editor/translations/eu.po index b47056d82b..e461c0f1ec 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -735,6 +735,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/fa.po b/editor/translations/fa.po index 3f94d1112b..428b69062a 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -784,6 +784,11 @@ msgstr "متد در گره مقصد باید مشخص شده باشد!" #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "نام یک شناسهی معتبر نیست:" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/fi.po b/editor/translations/fi.po index a95c65be41..125656ed67 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -757,6 +757,11 @@ msgid "Method in target node must be specified." msgstr "Kohdesolmun metodi täytyy määrittää." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Nimi ei ole kelvollinen tunniste:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/fil.po b/editor/translations/fil.po index 920b91a30c..ceda61c802 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -743,6 +743,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/fr.po b/editor/translations/fr.po index fac3b9b84b..46d3adb070 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -834,6 +834,10 @@ msgid "Method in target node must be specified." msgstr "La méthode du nœud cible doit être spécifiée." #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "Le nom de la méthode doit être un identifiant valide." + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ga.po b/editor/translations/ga.po index b9e6ba69c6..70dd5eada7 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -736,6 +736,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/he.po b/editor/translations/he.po index 56126249dc..7895ae48fe 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -777,6 +777,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/hi.po b/editor/translations/hi.po index 4782afecb0..e3ae2aabe5 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -756,6 +756,11 @@ msgid "Method in target node must be specified." msgstr "Method को target node में निर्दिष्ट कीजिए." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Method को target node में निर्दिष्ट कीजिए." + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/hr.po b/editor/translations/hr.po index ad095145b2..5355ee1dc9 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -741,6 +741,11 @@ msgid "Method in target node must be specified." msgstr "Metoda u ciljnom čvoru mora biti određena." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Metoda u ciljnom čvoru mora biti određena." + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/hu.po b/editor/translations/hu.po index ef15f85977..b57028a426 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -790,6 +790,11 @@ msgstr "Nevezze meg a metódust a cél Node-ban!" #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Nevezze meg a metódust a cél Node-ban!" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/id.po b/editor/translations/id.po index f7a86197b6..92c0c25da9 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -778,6 +778,11 @@ msgid "Method in target node must be specified." msgstr "Method dalam node target harus ditentukan." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Nama bukan sebuah pengidentifikasi yang sah:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/is.po b/editor/translations/is.po index 5a1ac9b73c..f0d93d1242 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -770,6 +770,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/it.po b/editor/translations/it.po index eeec1e05eb..bb53d26fa4 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -50,12 +50,13 @@ # J. Lavoie <j.lavoie@net-c.ca>, 2020. # Andrea Terenziani <andrea.terenziani.at@gmail.com>, 2020. # Anonymous <noreply@weblate.org>, 2020. +# riccardo boffelli <riccardo.boffelli.96@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-05-07 21:28+0000\n" -"Last-Translator: Sean Bone <seanbone@zumguy.com>\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" +"Last-Translator: riccardo boffelli <riccardo.boffelli.96@gmail.com>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" "Language: it\n" @@ -63,7 +64,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -802,6 +803,11 @@ msgid "Method in target node must be specified." msgstr "Il metodo del nodo designato deve essere specificato." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Il nome non è un identificatore valido:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -1499,7 +1505,7 @@ msgstr "Riordina gli Autoload" #: editor/editor_autoload_settings.cpp msgid "Can't add autoload:" -msgstr "" +msgstr "Non è possibile aggiungere l'autoload:" #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -2463,15 +2469,16 @@ msgid "Can't reload a scene that was never saved." msgstr "Impossibile ricaricare una scena che non è mai stata salvata." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Saved Scene" -msgstr "Salva Scena" +msgstr "Ricarica scena salvata" #: editor/editor_node.cpp msgid "" "The current scene has unsaved changes.\n" "Reload the saved scene anyway? This action cannot be undone." msgstr "" +"La scena attuale ha dei cambiamenti non salvati.\n" +"Ricaricare comunque la scena salvata? Questa azione non può essere annullata." #: editor/editor_node.cpp msgid "Quick Run Scene..." @@ -3418,11 +3425,10 @@ msgid "Did you forget the '_run' method?" msgstr "Hai dimenticato il metodo '_run'?" #: editor/editor_spin_slider.cpp -#, fuzzy msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes." msgstr "" -"Mantieni premuto Control per rilasciare un Getter. Mantieni premuto Shift " -"per rilasciare una firma generica." +"Tenere premuto il tasto Ctrl per arrotondare ai numeri interi. Tenere " +"premuto Shift per modifiche più precise." #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" @@ -4022,8 +4028,10 @@ msgid "Error running post-import script:" msgstr "Errore di esecuzione dello script di post-import:" #: editor/import/resource_importer_scene.cpp +#, fuzzy msgid "Did you return a Node-derived object in the `post_import()` method?" msgstr "" +"Avete restituito un oggetto derivato da un Nodo nel metodo `post_import()`?" #: editor/import/resource_importer_scene.cpp msgid "Saving..." @@ -6992,9 +7000,8 @@ msgstr "" "Manca il metodo '%s' connesso per il segnale '%s' dal nodo '%s' al nodo '%s'." #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "[Ignore]" -msgstr "(ignora)" +msgstr "[ignora]" #: editor/plugins/script_text_editor.cpp msgid "Line" @@ -7480,6 +7487,12 @@ msgid "" "Closed eye: Gizmo is hidden.\n" "Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")." msgstr "" +"Fare clic per passare da uno stato di visibilità all'altro.\n" +"\n" +"Apri gli occhi: Gizmo è visibile.\n" +"Occhio chiuso: Gizmo è nascosto.\n" +"Occhio semiaperto: Gizmo è visibile anche attraverso superfici opache " +"(\"raggi X\")." #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes To Floor" @@ -10579,9 +10592,8 @@ msgid "Instance Child Scene" msgstr "Istanzia Scena Figlia" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" -msgstr "Allega Script" +msgstr "Rimuovi Script" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." @@ -10747,11 +10759,15 @@ msgid "Open Documentation" msgstr "Apri la documentazione" #: editor/scene_tree_dock.cpp +#, fuzzy msgid "" "Cannot attach a script: there are no languages registered.\n" "This is probably because this editor was built with all language modules " "disabled." msgstr "" +"Non è possibile allegare uno script: non ci sono linguaggi registrati.\n" +"Questo probabilmente perché questo editor è stato costruito con tutti i " +"moduli di lingua disabilitati." #: editor/scene_tree_dock.cpp msgid "Add Child Node" @@ -10802,14 +10818,12 @@ msgstr "" "root esiste." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Attach a new or existing script to the selected node." -msgstr "Allega un nuovo script o uno esistente al nodo selezionato." +msgstr "Allega un nuovo script o uno già esistente al nodo selezionato." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach the script from the selected node." -msgstr "Svuota uno script per il nodo selezionato." +msgstr "Rimuovi lo script per il nodo selezionato." #: editor/scene_tree_dock.cpp msgid "Remote" @@ -12072,30 +12086,40 @@ msgid "Invalid package name:" msgstr "Nome del pacchetto non valido:" #: platform/android/export/export.cpp +#, fuzzy msgid "" "Invalid \"GodotPaymentV3\" module included in the \"android/modules\" " "project setting (changed in Godot 3.2.2).\n" msgstr "" +"Modulo \"GodotPaymentV3\" non valido incluso nell'impostazione del progetto " +"\" android/moduli\" (modificato in Godot 3.2.2).\n" #: platform/android/export/export.cpp msgid "\"Use Custom Build\" must be enabled to use the plugins." -msgstr "" +msgstr "Per utilizzare i plugin \"Use Custom Build\" deve essere abilitato." #: platform/android/export/export.cpp +#, fuzzy msgid "" "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR" "\"." msgstr "" +"\"Degrees Of Freedom\" è valido solo quando \"Xr Mode\" è \"Oculus Mobile VR" +"\"." #: platform/android/export/export.cpp +#, fuzzy msgid "" "\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." msgstr "" +"\"Hand Tracking\" è valido solo quando \"Xr Mode\" è \"Oculus Mobile VR\"." #: platform/android/export/export.cpp +#, fuzzy msgid "" "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." msgstr "" +"\"Focus Awareness\" è valida solo quando \"Xr Mode\" è \"Oculus Mobile VR\"." #: platform/android/export/export.cpp msgid "" diff --git a/editor/translations/ja.po b/editor/translations/ja.po index 7d4aed4b29..fc8444d6bc 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -786,6 +786,11 @@ msgid "Method in target node must be specified." msgstr "対象ノードのメソッドを指定してください。" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "この名前は無効な識別子です:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ka.po b/editor/translations/ka.po index 2435a50898..af03b1af9e 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -790,6 +790,11 @@ msgstr "სამიზნე კვანძში მეთოდი უნდ #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "სამიზნე კვანძში მეთოდი უნდა იყოს განსაზღვრული!" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ko.po b/editor/translations/ko.po index c568dc19b8..a895af27b6 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -768,6 +768,11 @@ msgid "Method in target node must be specified." msgstr "대상 노드에 있는 메서드는 반드시 지정해야 합니다." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "이름이 올바른 식별자가 아님:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/lt.po b/editor/translations/lt.po index bbbe630d4a..fdf9ef15ae 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -773,6 +773,11 @@ msgstr "Metodas pasirinktame Node turi būti nurodytas!" #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Metodas pasirinktame Node turi būti nurodytas!" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/lv.po b/editor/translations/lv.po index b69ecf7eef..8417a6b650 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -757,6 +757,11 @@ msgid "Method in target node must be specified." msgstr "Metodi mērķa mezglā nepieciešams specificēt." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Metodi mērķa mezglā nepieciešams specificēt." + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/mi.po b/editor/translations/mi.po index fbf4bce3d6..ab68a71ee2 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -728,6 +728,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ml.po b/editor/translations/ml.po index 77ac327f71..db5f5638f3 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -738,6 +738,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/mr.po b/editor/translations/mr.po index 38e3ee7185..1700bcb138 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -735,6 +735,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ms.po b/editor/translations/ms.po index 233b5cb428..160fa6e69f 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -758,6 +758,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/nb.po b/editor/translations/nb.po index 5c80321d03..4e7ca2dce1 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-06-03 20:09+0000\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" "Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n" "Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/godot-" "engine/godot/nb_NO/>\n" @@ -28,7 +28,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -796,6 +796,11 @@ msgstr "Metode i mål-Node må spesifiseres!" #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Navn er ikke en gyldig identifikator:" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -3772,12 +3777,9 @@ msgid "Favorites" msgstr "Favoritter:" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Status: Import of file failed. Please fix file and reimport manually." msgstr "" -"\n" -"Status: Import av fil feilet. Vennligst reparer filen eller reimporter " -"manuelt." +"Status: Import av fil feilet. Reparer filen eller importer igjen manuelt." #: editor/filesystem_dock.cpp #, fuzzy diff --git a/editor/translations/nl.po b/editor/translations/nl.po index 8e6c4bcfa4..3d560d3d6d 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -44,7 +44,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-06-15 01:48+0000\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" "Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n" "Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/" "nl/>\n" @@ -53,7 +53,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -790,6 +790,11 @@ msgid "Method in target node must be specified." msgstr "Methode in doelknoop moet gespecificeerd worden." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Naam is geen geldige identifier:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -1987,15 +1992,15 @@ msgstr "standaard:" #: editor/editor_help.cpp msgid "Methods" -msgstr "Methodes" +msgstr "Methoden" #: editor/editor_help.cpp msgid "Theme Properties" -msgstr "Thema Eigenschappen" +msgstr "Thema-eigenschappen" #: editor/editor_help.cpp msgid "Enumerations" -msgstr "Enumeraties" +msgstr "Enumeratie" #: editor/editor_help.cpp msgid "Constants" @@ -2003,7 +2008,7 @@ msgstr "Constanten" #: editor/editor_help.cpp msgid "Property Descriptions" -msgstr "Eigenschap Beschrijvingen" +msgstr "Eigenschapbeschrijvingen" #: editor/editor_help.cpp msgid "(value)" @@ -2019,7 +2024,7 @@ msgstr "" #: editor/editor_help.cpp msgid "Method Descriptions" -msgstr "Methode Beschrijvingen" +msgstr "Methodebeschrijvingen" #: editor/editor_help.cpp msgid "" diff --git a/editor/translations/or.po b/editor/translations/or.po index afff834dee..d6678c2819 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -734,6 +734,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 414e66685a..558a86f1cb 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -43,7 +43,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-06-06 10:15+0000\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" "Last-Translator: Tomek <kobewi4e@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" @@ -53,7 +53,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -791,6 +791,11 @@ msgid "Method in target node must be specified." msgstr "Metoda w węźle docelowym musi zostać podana." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Nazwa nie jest prawidłowym identyfikatorem:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -1484,7 +1489,7 @@ msgstr "Przestaw Autoloady" #: editor/editor_autoload_settings.cpp msgid "Can't add autoload:" -msgstr "" +msgstr "Nie można dodać Autoload:" #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1858,11 +1863,11 @@ msgstr "Przełącz ukryte pliki" #: editor/editor_file_dialog.cpp msgid "Toggle Favorite" -msgstr "Ustaw jako ulubione" +msgstr "Przełącz ulubione" #: editor/editor_file_dialog.cpp msgid "Toggle Mode" -msgstr "Przełącz tryby" +msgstr "Przełącz tryb" #: editor/editor_file_dialog.cpp msgid "Focus Path" @@ -1870,11 +1875,11 @@ msgstr "Przejdź do wprowadzania ścieżki" #: editor/editor_file_dialog.cpp msgid "Move Favorite Up" -msgstr "Przesuń Ulubiony w górę" +msgstr "Przesuń ulubiony w górę" #: editor/editor_file_dialog.cpp msgid "Move Favorite Down" -msgstr "Przesuń Ulubiony w dół" +msgstr "Przesuń ulubiony w dół" #: editor/editor_file_dialog.cpp msgid "Go to previous folder." @@ -2122,7 +2127,7 @@ msgstr "Wyczyść" #: editor/editor_log.cpp msgid "Clear Output" -msgstr "Wyczyść dane wyjściowe" +msgstr "Wyczyść wyjście" #: editor/editor_network_profiler.cpp editor/editor_node.cpp #: editor/editor_profiler.cpp @@ -2440,15 +2445,16 @@ msgid "Can't reload a scene that was never saved." msgstr "Nie można przeładować sceny która nie została zapisana." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Saved Scene" -msgstr "Zapisz scenę" +msgstr "Przywróć zapisaną scenę" #: editor/editor_node.cpp msgid "" "The current scene has unsaved changes.\n" "Reload the saved scene anyway? This action cannot be undone." msgstr "" +"Aktualna scena ma niezapisane zmiany.\n" +"Przywrócić zapisaną scenę tak czy inaczej? Ta akcja nie może zostać cofnięta." #: editor/editor_node.cpp msgid "Quick Run Scene..." @@ -2854,8 +2860,10 @@ msgid "" "When used remotely on a device, this is more efficient with network " "filesystem." msgstr "" -"Wszelkie zmiany sceny w edytorze będą odtworzone w uruchomionej grze na " -"urządzeniu zdalnym. Opcja ta działa szybciej na sieciowych systemach plików." +"Kiedy ta opcja jest włączona, wszystkie zmiany na scenie w edytorze będą " +"powtórzone w uruchomionej grze.\n" +"Kiedy używane zdalnie na urządzeniu, ta opcja jest wydajniejsza w sieciowym " +"systemie plików." #: editor/editor_node.cpp msgid "Sync Script Changes" @@ -2868,9 +2876,10 @@ msgid "" "When used remotely on a device, this is more efficient with network " "filesystem." msgstr "" -"Wszelkie zmiany skryptów będą synchronizowane z urządzeniem zdalnym " -"(działające instancje będą zrestartowane). Opcja ta działa szybciej z " -"użyciem sieciowych systemów plików." +"Kiedy ta opcja jest włączona, każdy zapisany skrypt będzie przeładowany w " +"uruchomionej grze.\n" +"Kiedy używane zdalnie na urządzeniu, ta opcja jest wydajniejsza w sieciowym " +"systemie plików." #: editor/editor_node.cpp editor/script_create_dialog.cpp msgid "Editor" @@ -2894,7 +2903,7 @@ msgstr "Zrzuty ekranu są przechowywane w folderze danych/ustawień edytora." #: editor/editor_node.cpp msgid "Toggle Fullscreen" -msgstr "Pełny ekran" +msgstr "Przełącz pełny ekran" #: editor/editor_node.cpp msgid "Toggle System Console" @@ -3378,11 +3387,10 @@ msgid "Did you forget the '_run' method?" msgstr "Zapomniano metody \"_run\"?" #: editor/editor_spin_slider.cpp -#, fuzzy msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes." msgstr "" -"Przytrzymaj Ctrl, by upuścić pobieracz (Getter). Przytrzymaj Shift, by " -"upuścić generyczną sygnaturę." +"Przytrzyma Ctrl, by zaokrąglić do liczb całkowitych. Przytrzymaj Shift dla " +"bardziej precyzyjnych zmian." #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" @@ -3983,7 +3991,7 @@ msgstr "Błąd podczas uruchamiania skryptu po imporcie:" #: editor/import/resource_importer_scene.cpp msgid "Did you return a Node-derived object in the `post_import()` method?" -msgstr "" +msgstr "Czy zwracasz obiekt dziedziczący po Node w metodzie `post_import()`?" #: editor/import/resource_importer_scene.cpp msgid "Saving..." @@ -5416,7 +5424,7 @@ msgstr "Tryb przesuwania" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Rotate Mode" -msgstr "Tryb Rotacji" +msgstr "Tryb obrotu" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5556,7 +5564,7 @@ msgstr "Widok" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Always Show Grid" -msgstr "Zawsze pokaż siatkę" +msgstr "Zawsze pokazuj siatkę" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Show Helpers" @@ -6938,9 +6946,8 @@ msgstr "" "\"%s\"." #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "[Ignore]" -msgstr "(ignoruj)" +msgstr "[Ignoruj]" #: editor/plugins/script_text_editor.cpp msgid "Line" @@ -6978,7 +6985,7 @@ msgstr "Wielkie litery" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Lowercase" -msgstr "Małe Litery" +msgstr "Małe litery" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Capitalize" @@ -7054,7 +7061,7 @@ msgstr "Wylicz wyrażenie" #: editor/plugins/script_text_editor.cpp msgid "Trim Trailing Whitespace" -msgstr "Przytnij końcowe spacje" +msgstr "Przytnij końcowe białe znaki" #: editor/plugins/script_text_editor.cpp msgid "Convert Indent to Spaces" @@ -7387,7 +7394,7 @@ msgstr "\"Wolny widok\" w tył" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Up" -msgstr "\"Wolny widok\" w góre" +msgstr "\"Wolny widok\" w górę" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Down" @@ -7425,6 +7432,12 @@ msgid "" "Closed eye: Gizmo is hidden.\n" "Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")." msgstr "" +"Kliknij, by przełączyć pomiędzy stanami widoczności.\n" +"\n" +"Otwarte oko: uchwyt jest widzialny.\n" +"Zamknięte oko: uchwyt jest ukryty.\n" +"Półotwarte oko: uchwyt jest również widoczny przez nieprzezroczyste " +"powierzchnie (\"x-ray\")." #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes To Floor" @@ -7519,7 +7532,7 @@ msgstr "2 widoki" #: editor/plugins/spatial_editor_plugin.cpp msgid "2 Viewports (Alt)" -msgstr "2 widoki (Alt)" +msgstr "2 widoki (alternatywnie)" #: editor/plugins/spatial_editor_plugin.cpp msgid "3 Viewports" @@ -7527,7 +7540,7 @@ msgstr "3 widoki" #: editor/plugins/spatial_editor_plugin.cpp msgid "3 Viewports (Alt)" -msgstr "3 widoki (Alt)" +msgstr "3 widoki (alternatywnie)" #: editor/plugins/spatial_editor_plugin.cpp msgid "4 Viewports" @@ -8807,7 +8820,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for fragment and light shader modes." -msgstr "Parametr wejściowy \"%s\" dla dla fragmentowego i światłowego shadera." +msgstr "Parametr wejściowy \"%s\" dla fragmentowego i światłowego shadera." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for fragment shader mode." @@ -9507,16 +9520,16 @@ msgid "" "Filters to export non-resource files/folders\n" "(comma-separated, e.g: *.json, *.txt, docs/*)" msgstr "" -"Filtry do eksportowania plików/folderów nie będących zasobami (oddzielone " -"przecinkami, np. *.json, *.txt)" +"Filtry do eksportowania plików/folderów nie będących zasobami\n" +"(oddzielone przecinkami, np. *.json, *.txt, docs/*)" #: editor/project_export.cpp msgid "" "Filters to exclude files/folders from project\n" "(comma-separated, e.g: *.json, *.txt, docs/*)" msgstr "" -"Filtry do wykluczenia plików/folderów z projektu (rozdzielone przecinkami, " -"np. *.json, *.txt)" +"Filtry do wykluczenia plików/folderów z projektu\n" +"(oddzielone przecinkami, np. *.json, *.txt, docs/*)" #: editor/project_export.cpp msgid "Patches" @@ -10515,9 +10528,8 @@ msgid "Instance Child Scene" msgstr "Dodaj instancję sceny" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" -msgstr "Dodaj skrypt" +msgstr "Odłącz skrypt" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." @@ -10635,7 +10647,7 @@ msgstr "Nie można działać na węzłach z których dziedziczy obecna scena!" #: editor/scene_tree_dock.cpp msgid "Attach Script" -msgstr "Dodaj skrypt" +msgstr "Dołącz skrypt" #: editor/scene_tree_dock.cpp msgid "Remove Node(s)" @@ -10687,6 +10699,9 @@ msgid "" "This is probably because this editor was built with all language modules " "disabled." msgstr "" +"Nie można dołączyć skryptu: brak zarejestrowanych języków.\n" +"To prawdopodobnie przez to, że ten edytor został zbudowany z wyłączonymi " +"wszystkimi modułami języków." #: editor/scene_tree_dock.cpp msgid "Add Child Node" @@ -10737,14 +10752,12 @@ msgstr "" "główny nie istnieje." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Attach a new or existing script to the selected node." msgstr "Dołącz nowy lub istniejący skrypt do zaznaczonego węzła." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach the script from the selected node." -msgstr "Wyczyść skrypt dla zaznaczonego węzła." +msgstr "Odłącz skrypt z zaznaczonego węzła." #: editor/scene_tree_dock.cpp msgid "Remote" @@ -10783,7 +10796,7 @@ msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" -"Węzeł posiada %s połączeń i %s grup.\n" +"Węzeł posiada %s połączeń i %s grup.\n" "Kliknij, aby wyświetlić panel sygnałów." #: editor/scene_tree_editor.cpp @@ -11839,15 +11852,15 @@ msgstr "Znajdź typ węzła" #: modules/visual_script/visual_script_editor.cpp msgid "Copy Nodes" -msgstr "Skopiuj Węzeł" +msgstr "Skopiuj węzły" #: modules/visual_script/visual_script_editor.cpp msgid "Cut Nodes" -msgstr "Wytnij Węzły" +msgstr "Wytnij węzły" #: modules/visual_script/visual_script_editor.cpp msgid "Make Function" -msgstr "Zmień na funkcję" +msgstr "Zamień na funkcję" #: modules/visual_script/visual_script_editor.cpp msgid "Refresh Graph" @@ -11969,11 +11982,9 @@ msgstr "" "eksportu." #: platform/android/export/export.cpp -#, fuzzy msgid "Release keystore incorrectly configured in the export preset." msgstr "" -"Debugowy keystore nieskonfigurowany w Ustawieniach Edytora ani w profilu " -"eksportu." +"Wydaniowy keystore jest niepoprawnie skonfigurowany w profilu eksportu." #: platform/android/export/export.cpp msgid "Custom build requires a valid Android SDK path in Editor Settings." @@ -12007,26 +12018,34 @@ msgid "" "Invalid \"GodotPaymentV3\" module included in the \"android/modules\" " "project setting (changed in Godot 3.2.2).\n" msgstr "" +"Niepoprawny moduł \"GodotPaymentV3\" załączony w ustawieniu projektu " +"\"android/modules\" (zmieniony w Godocie 3.2.2).\n" #: platform/android/export/export.cpp msgid "\"Use Custom Build\" must be enabled to use the plugins." -msgstr "" +msgstr "\"Use Custom Build\" musi być włączone, by używać wtyczek." #: platform/android/export/export.cpp msgid "" "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR" "\"." msgstr "" +"\"Degrees Of Freedom\" jest poprawne tylko gdy \"Xr Mode\" jest \"Oculus " +"Mobile VR\"." #: platform/android/export/export.cpp msgid "" "\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." msgstr "" +"\"Hand Tracking\" jest poprawne tylko gdy \"Xr Mode\" jest \"Oculus Mobile VR" +"\"." #: platform/android/export/export.cpp msgid "" "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." msgstr "" +"\"Focus Awareness\" jest poprawne tylko gdy \"Xr Mode\" jest \"Oculus Mobile " +"VR\"." #: platform/android/export/export.cpp msgid "" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index 9d46edcbae..bfa3d0b52c 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -5,12 +5,13 @@ # Calum Knott <calum@calumk.com>, 2017. # Zion Nimchuk <zionnimchuk@gmail.com>, 2016-2017. # Allan Nordhøy <epost@anotheragency.no>, 2018. +# David Fatheree <david.fathereewcchs@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2018-12-13 14:42+0100\n" -"Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" +"Last-Translator: David Fatheree <david.fathereewcchs@gmail.com>\n" "Language-Team: Pirate <https://hosted.weblate.org/projects/godot-engine/" "godot/pr/>\n" "Language: pr\n" @@ -18,7 +19,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Poedit 2.2\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -29,7 +30,7 @@ msgstr "" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "Expected a strin' o' length 1 (a character)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -39,19 +40,17 @@ msgstr "Nah enough bytes fer decodin' bytes, or ye got th' wrong ship." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" -msgstr "" +msgstr "Shiver me timbers! Ye input %i (not passed) in ye expression!" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" msgstr "" #: core/math/expression.cpp -#, fuzzy msgid "Invalid operands to operator %s, %s and %s." msgstr "Yer index property name '%s' in node %s be walkin' th' plank!" #: core/math/expression.cpp -#, fuzzy msgid "Invalid index of type %s for base type %s" msgstr "Yer index property name '%s' in node %s be walkin' th' plank!" @@ -102,11 +101,11 @@ msgstr "" #: editor/animation_bezier_editor.cpp msgid "Balanced" -msgstr "" +msgstr "Smooth Sailin'" #: editor/animation_bezier_editor.cpp msgid "Mirror" -msgstr "" +msgstr "See'in Double" #: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp msgid "Time:" @@ -767,6 +766,11 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Yer name's got no valid identifier:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index 199d828897..426888b3a4 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -16,7 +16,7 @@ # jonathan railarem <railarem@gmail.com>, 2017. # Lucas Silva <lucasb.hpp@gmail.com>, 2018. # Luiz G. Correia <luizgabriell2.0@gmail.com>, 2017. -# Mailson Silva Marins <mailsons335@gmail.com>, 2016. +# Mailson Silva Marins <mailsons335@gmail.com>, 2016, 2020. # MalcomRF <malcomkbk@gmail.com>, 2017. # Marcus Correia <marknokalt@live.com>, 2017-2018. # Michael Alexsander Silva Dias <michaelalexsander@protonmail.com>, 2017-2018. @@ -73,7 +73,7 @@ # Alan Tavares <alan1tavares@gmail.com>, 2019. # Rafael Silveira <res883@gmail.com>, 2019. # Luigi <luigimendeszanchett@gmail.com>, 2019. -# Nicolas Abril <nicolas.abril@protonmail.ch>, 2019. +# Nicolas Abril <nicolas.abril@protonmail.ch>, 2019, 2020. # johnnybigoode <jamarson@gmail.com>, 2019, 2020. # Zeero <igcdzeero@gmail.com>, 2019. # Gian Penna <gianfrancopen@gmail.com>, 2020. @@ -92,13 +92,13 @@ # Anonymous <noreply@weblate.org>, 2020. # André Sousa <andrelvsousa@gmail.com>, 2020. # Kleyton Luiz de Sousa Vieira <kleytonluizdesouzavieira@gmail.com>, 2020. +# Felipe Jesus Macedo <fmacedo746@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: 2016-05-30\n" -"PO-Revision-Date: 2020-06-15 01:48+0000\n" -"Last-Translator: Kleyton Luiz de Sousa Vieira " -"<kleytonluizdesouzavieira@gmail.com>\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" +"Last-Translator: Felipe Jesus Macedo <fmacedo746@gmail.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -106,7 +106,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -125,11 +125,11 @@ msgstr "Não há bytes suficientes para decodificar, ou o formato é inválido." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" -msgstr "Entrada inválida %i (não passou) na expressão" +msgstr "Entrada inválida %i (não passada) na expressão" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" -msgstr "self não pode ser usado porque a instância é nula (não passou)" +msgstr "self não pode ser usado porque a instância é nula (não passada)" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." @@ -145,7 +145,7 @@ msgstr "Nome inválido de índice '%s' para base tipo %s" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" -msgstr "Argumento inválido para construir '%s'" +msgstr "Argumentos inválidos para o construto '%s'" #: core/math/expression.cpp msgid "On call to '%s':" @@ -579,7 +579,7 @@ msgstr "" "Esta animação pertence a uma cena importada, dessa forma, mudanças das " "trilhas importadas não serão salvas.\n" "\n" -"Para ativar a possibilidade de adicionar trilhas customizadas, navegue até " +"Para ativar a possibilidade de adicionar trilhas customizadas, navegue até " "as configurações de importação da cena e defina\n" "\"Animação > Armazenamento\" para \"Arquivos\", ative \"Animação > Mantenha " "Trilhas Customizadas\", então reimporte.\n" @@ -843,6 +843,11 @@ msgid "Method in target node must be specified." msgstr "O método no nó alvo precisa ser especificado." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "O nome não é um identificador valido:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -1919,7 +1924,7 @@ msgstr "Alternar Modo" #: editor/editor_file_dialog.cpp msgid "Focus Path" -msgstr "Focar no Caminho" +msgstr "Habilitar" #: editor/editor_file_dialog.cpp msgid "Move Favorite Up" @@ -2622,8 +2627,8 @@ msgid "" "category." msgstr "" "A cena principal não foi definida, selecionar uma?\n" -"Você pode alterá-la mais tarde nas \"Configurações do Projeto\" na " -"categoria 'Application'." +"Você pode alterá-la mais tarde nas \"Configurações do Projeto\" na categoria " +"'Application'." #: editor/editor_node.cpp msgid "" @@ -2899,8 +2904,8 @@ msgid "" "Navigation meshes and polygons will be visible on the running game if this " "option is turned on." msgstr "" -"Malhas e polígonos de navegação serão visíveis no jogo se esta opção estiver " -"ligada." +"Malhas e polígonos de navegação serão visíveis no jogo em execução se esta " +"opção estiver ligada." #: editor/editor_node.cpp msgid "Sync Scene Changes" @@ -3121,13 +3126,13 @@ msgid "" "the \"Use Custom Build\" option should be enabled in the Android export " "preset." msgstr "" -"Isso vai configurar seu projeto para construções customizadas do Android, " -"instalando o modelo de fonte para \"res://android/build\".\n" -"Você pode então aplicar modificações e construir seu próprio APK na guia " -"Exportação (Adicionando módulos, trocando o AndroidManifest.xml, etc.).\n" -"Note que para fazer uma construção customizada, em vez de usar APKs pre-" -"construídos, a opção \"Usar Construção Customizada\" deve estar ativa nas " -"predefinições de exportação Android." +"Isso irá configurar o projeto para usar uma build do Android customizada " +"instalando a template raiz para \"res://android/build\".\n" +"Você poderá aplicar modificações e construir um APK customizado em exportar " +"(adicionando módulos, changing the AndroidManifest.xml, etc.).\n" +"Note que para fazer builds customizadas ao invés de usar APKs pré-" +"construídas, a opção \"Usar Build Customizada\" deve sestar habilitada na " +"pré-configuração de exportação Android." #: editor/editor_node.cpp msgid "" @@ -4047,7 +4052,7 @@ msgstr "Erro ao rodar script pós-importação:" #: editor/import/resource_importer_scene.cpp msgid "Did you return a Node-derived object in the `post_import()` method?" -msgstr "" +msgstr "Você retornou um objeto derivado de nó no método `post import ()`?" #: editor/import/resource_importer_scene.cpp msgid "Saving..." @@ -5659,7 +5664,7 @@ msgstr "Seleção de Frame" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Preview Canvas Scale" -msgstr "Visualizar Canvas Scale" +msgstr "Pré-visualização da escala do Canvas" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Translation mask for inserting keys." @@ -5667,7 +5672,7 @@ msgstr "Máscara de tradução para inserção de chaves." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation mask for inserting keys." -msgstr "Mascara de rotação para inserção de chaves." +msgstr "Máscara de rotação para inserção de chaves." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Scale mask for inserting keys." @@ -7005,9 +7010,8 @@ msgid "" msgstr "Falta método conectado '%s' para sinal '%s' do nó '%s' para nó '%s'." #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "[Ignore]" -msgstr "(ignore)" +msgstr "(Ignore)" #: editor/plugins/script_text_editor.cpp msgid "Line" @@ -7438,27 +7442,27 @@ msgstr "Não disponível ao usar o renderizador GLES2." #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Left" -msgstr "Visão Livre Esquerda" +msgstr "Visão Livre na Esquerda" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Right" -msgstr "Visão Livre Direita" +msgstr "Visão Livre na Direita" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Forward" -msgstr "Visão Livre Frente" +msgstr "Visão Livre na Frente" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Backwards" -msgstr "Visão Livre Trás" +msgstr "Visão Livre Atrás" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Up" -msgstr "Visão Livre Cima" +msgstr "Visão Livre em Cima" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Down" -msgstr "Visão Livre Baixo" +msgstr "Visão Livre Embaixo" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Speed Modifier" @@ -7492,6 +7496,12 @@ msgid "" "Closed eye: Gizmo is hidden.\n" "Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")." msgstr "" +"Clique para alternar entre estados de visibilidade.\n" +"\n" +"Olhos abertos: Gizmo está visível.\n" +"Olhos fechados: Gizmo não está visível.\n" +"Olhos semi-abertos: Gizmo está visível através de superficies opacas (\"raio-" +"x\")." #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes To Floor" @@ -7517,7 +7527,7 @@ msgstr "Usar Espaço Local" #: editor/plugins/spatial_editor_plugin.cpp msgid "Use Snap" -msgstr "Usar Snap" +msgstr "Use Snap" #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View" @@ -8379,9 +8389,9 @@ msgid "" "Shift+LMB: Set wildcard bit.\n" "Click on another Tile to edit it." msgstr "" -"LMB: ligar bit.\n" -"RMB: desligar bit.\n" -"Shift+LMB: Escolher bit wildcard.\n" +"LMB: Ligar bit.\n" +"RMB: Desligar bit.\n" +"Shift+LMB: Escolher bit curinga.\n" "Clique em outro Mosaico para editá-lo." #: editor/plugins/tile_set_editor_plugin.cpp @@ -8516,7 +8526,7 @@ msgstr "Nenhuma mensagem de confirmação foi fornecida" #: editor/plugins/version_control_editor_plugin.cpp msgid "No files added to stage" -msgstr "Nenhum arquivo adicionado ao palco" +msgstr "Nenhum arquivo em espera" #: editor/plugins/version_control_editor_plugin.cpp msgid "Commit" @@ -8524,11 +8534,11 @@ msgstr "Confirmação" #: editor/plugins/version_control_editor_plugin.cpp msgid "VCS Addon is not initialized" -msgstr "Extensão VCS não está inicializada" +msgstr "VCS Addon não inicializado" #: editor/plugins/version_control_editor_plugin.cpp msgid "Version Control System" -msgstr "Sistema de Controle de Versionamento" +msgstr "Sistema de Controle de Versão" #: editor/plugins/version_control_editor_plugin.cpp msgid "Initialize" @@ -8536,7 +8546,7 @@ msgstr "Inicializar" #: editor/plugins/version_control_editor_plugin.cpp msgid "Staging area" -msgstr "Área Temporária" +msgstr "Área de espera" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect new changes" @@ -8560,7 +8570,7 @@ msgstr "Excluído" #: editor/plugins/version_control_editor_plugin.cpp msgid "Typechange" -msgstr "Alterar tipo" +msgstr "Alteração de tipo" #: editor/plugins/version_control_editor_plugin.cpp msgid "Stage Selected" @@ -8572,11 +8582,11 @@ msgstr "Salvar Tudo" #: editor/plugins/version_control_editor_plugin.cpp msgid "Add a commit message" -msgstr "Adicione uma mensagem de confirmação" +msgstr "Adicione uma mensagem ao commit" #: editor/plugins/version_control_editor_plugin.cpp msgid "Commit Changes" -msgstr "Confirmar Mudanças de Script" +msgstr "Confirmar Mudanças" #: editor/plugins/version_control_editor_plugin.cpp #: modules/gdnative/gdnative_library_singleton_editor.cpp @@ -8774,7 +8784,7 @@ msgstr "Cor constante." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color uniform." -msgstr "Cor uniforme." +msgstr "Uniformidade de cor." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the boolean result of the %s comparison between two parameters." @@ -8890,7 +8900,7 @@ msgstr "Parâmetro de entrada '%s' para o modo de sombra do vértice." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for vertex and fragment shader mode." msgstr "" -"Parâmetro de entrada '%s' para os modos de sombra de vértice e fragmentada." +"Parâmetro de entrada '%s' para os modo de sombra fragmentada e vértice." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Scalar function." @@ -9144,7 +9154,7 @@ msgstr "Execute a pesquisa de textura cúbica." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Perform the texture lookup." -msgstr "Faz uma busca de texturas." +msgstr "Faz uma busca por texturas." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Cubic texture uniform lookup." @@ -9160,7 +9170,7 @@ msgstr "Consulta de textura 2D uniforme com triplanar." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform function." -msgstr "Função Transform." +msgstr "Função Transformação..." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9182,7 +9192,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes transform from four vectors." -msgstr "Compõe transformação a partir de quatro vetores." +msgstr "Compõe a transformação de quatro vetores." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Decomposes transform to four vectors." @@ -9190,19 +9200,19 @@ msgstr "Decompõe transformação em quatro vetores." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the determinant of a transform." -msgstr "Calcula o determinante de uma transformada." +msgstr "Calcula o determinante de uma transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the inverse of a transform." -msgstr "Calcula a inversa de uma transformada." +msgstr "Calcula a inversa de uma transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the transpose of a transform." -msgstr "Calcula a transposta de uma transformada." +msgstr "Calcula a transposta de uma transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Multiplies transform by transform." -msgstr "Multiplica a transformação por transformação." +msgstr "Multiplica transformação por transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Multiplies vector by transform." @@ -9210,11 +9220,11 @@ msgstr "Multiplica vetor por transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform constant." -msgstr "Constante de transformação." +msgstr "Transformar constante." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform uniform." -msgstr "Uniforme de transformação." +msgstr "Transformação uniforme." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector function." @@ -9363,11 +9373,11 @@ msgstr "Subtrai vetor de vetor." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector constant." -msgstr "Vetor constante." +msgstr "Constante vetorial." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector uniform." -msgstr "Vector uniforme." +msgstr "Uniformidade vetorial." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9381,12 +9391,13 @@ msgstr "" "declarações de função internas." #: editor/plugins/visual_shader_editor_plugin.cpp +#, fuzzy msgid "" "Returns falloff based on the dot product of surface normal and view " "direction of camera (pass associated inputs to it)." msgstr "" -"Retorna falloff baseado no produto escalar do normal da superfície e da " -"direção de visualização da câmera (passe entradas associadas a ela)." +"Retorna falloff com base no produto dos pontos da superfície normal e na " +"direção de visualização da câmera (passa as entradas associadas a ela)." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9413,7 +9424,7 @@ msgid "" "(Fragment/Light mode only) (Vector) Derivative in 'x' using local " "differencing." msgstr "" -"(Apenas modo Fragmento/Luz) (Vetor) Derivada em 'x' usando diferenciação " +"(Apenas modo Fragmento/Luz) (Vetor) Derivativo em 'x' usando diferenciação " "local." #: editor/plugins/visual_shader_editor_plugin.cpp @@ -9832,7 +9843,7 @@ msgstr "Projeto ausente" #: editor/project_manager.cpp msgid "Error: Project is missing on the filesystem." -msgstr "Erro: O Projeto está ausente no sistema de arquivos." +msgstr "Erro: Projeto não encontrado no sistema de arquivos." #: editor/project_manager.cpp msgid "Can't open project at '%s'." @@ -9854,14 +9865,15 @@ msgid "" "Warning: You won't be able to open the project with previous versions of the " "engine anymore." msgstr "" -"O seguinte arquivo de configurações do projeto não especifica com qual " -"versão do Godot ele foi criado.\n" +"O seguinte arquivo de configurações do projeto não especifica a versão do " +"Godot pelo qual ele foi criado.\n" "\n" "%s\n" "\n" -"Se escolher abrí-lo, será convertido para o formato atual de arquivo de " -"configuração do Godot\n" -"Aviso: Você não poderá mais abrir o projeto com versões anteriores do Godot." +"Se você o abrir, ele será convertido para o formato de arquivo da " +"configuração atual do Godot.\n" +"Atenção: Você não será mais capaz de abrir o projeto com versões anteriores " +"da engine." #: editor/project_manager.cpp msgid "" @@ -9981,7 +9993,7 @@ msgstr "Novo Projeto" #: editor/project_manager.cpp msgid "Remove Missing" -msgstr "Remover Ausentes" +msgstr "Remover Ausente" #: editor/project_manager.cpp msgid "Templates" @@ -10144,7 +10156,7 @@ msgstr "Botão Direito." #: editor/project_settings_editor.cpp msgid "Middle Button." -msgstr "Botão do Meio." +msgstr "Botão do Meio." #: editor/project_settings_editor.cpp msgid "Wheel Up." @@ -10572,16 +10584,15 @@ msgstr "Instanciar Cena(s)" #: editor/scene_tree_dock.cpp msgid "Replace with Branch Scene" -msgstr "Substituir com Ramo como Cena" +msgstr "Substituir por cena ramo" #: editor/scene_tree_dock.cpp msgid "Instance Child Scene" msgstr "Instânciar Cena Filha" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" -msgstr "Adicionar Script" +msgstr "Remover Script" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." @@ -10751,6 +10762,9 @@ msgid "" "This is probably because this editor was built with all language modules " "disabled." msgstr "" +"Não pode associar um script: Não existem linguagens registradas.\n" +"É provável que o editor tenha sido construido com todos os módulos de " +"linguagem desabilitados." #: editor/scene_tree_dock.cpp msgid "Add Child Node" @@ -10801,14 +10815,12 @@ msgstr "" "existir um nó raiz." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Attach a new or existing script to the selected node." -msgstr "Adicionar um script novo ou existente para o nó selecionado." +msgstr "Adicionar um novo script, ou um já existente, para o nó selecionado." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach the script from the selected node." -msgstr "Remove um script do nó selecionado." +msgstr "Remove o script do nó selecionado." #: editor/scene_tree_dock.cpp msgid "Remote" @@ -10920,7 +10932,7 @@ msgstr "Selecione um Nó" #: editor/script_create_dialog.cpp msgid "Path is empty." -msgstr "O caminho está vazio." +msgstr "Caminho vazio." #: editor/script_create_dialog.cpp msgid "Filename is empty." @@ -11328,7 +11340,7 @@ msgstr "Singleton GDNative ativado" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Disabled GDNative Singleton" -msgstr "Singleton GDNative Desabilitado" +msgstr "GDNative Singleton desativado" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Library" @@ -11589,8 +11601,8 @@ msgid "" "Node yielded, but did not return a function state in the first working " "memory." msgstr "" -"Nó entrou em yield, mas não retornou um estado de função na primeira memória " -"de trabalho." +"O nó cedeu, mas não retornou um estado de função na primeira memória de " +"trabalho." #: modules/visual_script/visual_script.cpp msgid "" @@ -12041,20 +12053,20 @@ msgstr "" #, fuzzy msgid "Release keystore incorrectly configured in the export preset." msgstr "" -"Porta-chaves de depuração não configurado nas Configurações do Editor e nem " -"na predefinição." +"Keystore de liberação icorretamente configurada na predefinição de " +"exportação." #: platform/android/export/export.cpp msgid "Custom build requires a valid Android SDK path in Editor Settings." msgstr "" -"A compilação personalizada requer um caminho SDK do Android válido nas " +"Build personalizada precisa de um caminho Android SDK válido em " "Configurações do Editor." #: platform/android/export/export.cpp msgid "Invalid Android SDK path for custom build in Editor Settings." msgstr "" -"Caminho SDK do Android inválido para a compilação personalizada nas " -"Configurações do Editor." +"Caminho do Android SDK inválido para o build personalizado em Configurações " +"do Editor." #: platform/android/export/export.cpp msgid "" @@ -12066,7 +12078,7 @@ msgstr "" #: platform/android/export/export.cpp msgid "Invalid public key for APK expansion." -msgstr "Chave pública inválida para expansão de APK." +msgstr "Chave pública inválida para expansão do APK." #: platform/android/export/export.cpp msgid "Invalid package name:" @@ -12077,34 +12089,45 @@ msgid "" "Invalid \"GodotPaymentV3\" module included in the \"android/modules\" " "project setting (changed in Godot 3.2.2).\n" msgstr "" +"Módulo inválido \"GodotPaymentV3\" incluido na configuração de projeto " +"\"android/modules\" (changed in Godot 3.2.2).\n" #: platform/android/export/export.cpp msgid "\"Use Custom Build\" must be enabled to use the plugins." msgstr "" +"\"Use Custom Build\" precisa estar ativo para ser possível utilizar plugins." #: platform/android/export/export.cpp +#, fuzzy msgid "" "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR" "\"." msgstr "" +"\"Degrees Of Freedom\" só é válido quando o \"Oculus Mobile VR\" está no " +"\"Mode Xr\"." #: platform/android/export/export.cpp +#, fuzzy msgid "" "\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." msgstr "" +"\"Hand Tracking\" só é válido quando o\"Oculus Mobile VR\" está no \"Xr Mode" +"\"." #: platform/android/export/export.cpp msgid "" "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." msgstr "" +"\"Focus Awareness\" só é válido quando o \"Oculus Mobile VR\" está no \"Xr " +"Mode\"." #: platform/android/export/export.cpp msgid "" "Trying to build from a custom built template, but no version info for it " "exists. Please reinstall from the 'Project' menu." msgstr "" -"Tentando compilar a partir de um modelo compilado personalizado, mas nenhuma " -"informação de versão para ele existe. Por favor, reinstale pelo menu " +"Tentando construir a partir de um modelo compilado personalizado, mas " +"nenhuma informação de versão para ele existe. Por favor, reinstale pelo menu " "'Projeto'." #: platform/android/export/export.cpp @@ -12114,7 +12137,7 @@ msgid "" " Godot Version: %s\n" "Please reinstall Android build template from 'Project' menu." msgstr "" -"Diferença de versão da compilação do Android:\n" +"Diferença na versão da build do Android:\n" " Modelo instalado: %s\n" " Versão do Godot: %s\n" "Por favor reinstale o modelo de compilação do Android pelo menu 'Projeto'." @@ -12128,13 +12151,13 @@ msgid "" "Building of Android project failed, check output for the error.\n" "Alternatively visit docs.godotengine.org for Android build documentation." msgstr "" -"A compilação do projeto Android falhou, verifique a saída pelo erro.\n" +"A construção do projeto Android falhou, verifique a saída para detalhes.\n" "Alternativamente, visite docs.godotengine.org para ver a documentação de " "compilação do Android." #: platform/android/export/export.cpp msgid "No build apk generated at: " -msgstr "Nenhuma compilação apk gerada em: " +msgstr "Nenhuma construção apk gerada em: " #: platform/iphone/export/export.cpp msgid "Identifier is missing." @@ -12545,7 +12568,8 @@ msgstr "" #: scene/3d/collision_shape.cpp msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." -msgstr "Lol." +msgstr "" +"ConcavePolygonShape não suporta um RigidBody em outro modo além do estático." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." @@ -12718,7 +12742,7 @@ msgstr "Nada está ligado à entrada '%s' do nó '%s'." #: scene/animation/animation_tree.cpp msgid "No root AnimationNode for the graph is set." -msgstr "Um AnimationNode raiz para o gráfico não está definido." +msgstr "Nenhuma raiz AnimationNode para o gráfico está definida." #: scene/animation/animation_tree.cpp msgid "Path to an AnimationPlayer node containing animations is not set." @@ -12784,9 +12808,9 @@ msgid "" "The Hint Tooltip won't be displayed as the control's Mouse Filter is set to " "\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"." msgstr "" -"A Dica não será exibida quando o controle de Filtro do Mouse estiver " -"definido como \"Ignorar\". Para resolver, defina o Filtro do Mouse como " -"\"Parar\" ou \"Continuar\"." +"A sugestão de dica não será exibida quando o Filtro do Mouse do controle " +"estiver definido como \"Ignorar\". Para resolver isto, defina o Filtro do " +"Mouse como \"Parar\" ou \"Passar\"." #: scene/gui/dialogs.cpp msgid "Alert!" @@ -12831,7 +12855,7 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" "O Ambiente Padrão especificado nas Configurações de Projeto (Rendering -> " -"Environment -> Default Environment) não pôde ser carregado." +"Environment -> Default Environment) não pôde ser carregado." #: scene/main/viewport.cpp msgid "" diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po index 40a83eaa87..54accb0d6f 100644 --- a/editor/translations/pt_PT.po +++ b/editor/translations/pt_PT.po @@ -768,6 +768,11 @@ msgid "Method in target node must be specified." msgstr "Método no nó alvo deve ser especificado." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "O nome não é um identificador válido:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ro.po b/editor/translations/ro.po index 5e362de330..cbf6a8f0a0 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -749,6 +749,11 @@ msgid "Method in target node must be specified." msgstr "Metoda din nodul țintă trebuie specificată." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Metoda din nodul țintă trebuie specificată." + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ru.po b/editor/translations/ru.po index 8bae9207d0..a2e562446d 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -27,7 +27,7 @@ # Yan <uvokinuvokines@gmail.com>, 2018. # V. <Unit68189@gmail.com>, 2018, 2019. # Victor Butorin <mrwebsterchannel@gmail.com>, 2018. -# Александр <ol-vin@mail.ru>, 2018, 2019. +# Александр <ol-vin@mail.ru>, 2018, 2019, 2020. # Анатолий Горбунов <afgorbunov@gmail.com>, 2018, 2019. # Vadim Vergasov <vadim.vergasov2003@gmail.com>, 2018, 2019. # Аслан Снупов <aslan170505@gmail.com>, 2018. @@ -76,12 +76,14 @@ # Nikita <Kulacnikita@ya.ru>, 2020. # Alexander <ramzi7208@gmail.com>, 2020. # Alex Tern <ternvein@gmail.com>, 2020. +# Varion Drakon Neonovich <variondrakon@gmail.com>, 2020. +# d2cyb <dmitrydpb@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-06-15 12:01+0000\n" -"Last-Translator: Alex Tern <ternvein@gmail.com>\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" +"Last-Translator: Александр <ol-vin@mail.ru>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" "Language: ru\n" @@ -90,7 +92,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.1\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -99,13 +101,13 @@ msgstr "Неверный тип аргумента для convert(), испол #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "Ожидалась строка длиной 1 (символ)." +msgstr "Ожидалась строка длиной 1 (т.е. символ)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Not enough bytes for decoding bytes, or invalid format." -msgstr "Недостаточно байтов для декодирования или неверный формат." +msgstr "Недостаточно байтов для декодирования байтов или неверный формат." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -134,7 +136,7 @@ msgstr "Недопустимые аргументы для построения #: core/math/expression.cpp msgid "On call to '%s':" -msgstr "На вызове '%s':" +msgstr "При вызове '%s':" #: core/ustring.cpp msgid "B" @@ -190,11 +192,11 @@ msgstr "Вставить ключ здесь" #: editor/animation_bezier_editor.cpp msgid "Duplicate Selected Key(s)" -msgstr "Дублировать выделенные ключ(и)" +msgstr "Дублировать выделенные ключи" #: editor/animation_bezier_editor.cpp msgid "Delete Selected Key(s)" -msgstr "Удалить выделенные ключ(и)" +msgstr "Удалить выделенные ключи" #: editor/animation_bezier_editor.cpp msgid "Add Bezier Point" @@ -242,7 +244,7 @@ msgstr "Многократное изменение перехода" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Transform" -msgstr "Анимационное многократное изменение положения" +msgstr "Анимационное многосменное преобразование" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Keyframe Value" @@ -250,7 +252,7 @@ msgstr "Изменить значение ключевого кадра" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Call" -msgstr "Анимационный многократный вызов изменения" +msgstr "Изменить вызов анимации" #: editor/animation_track_editor.cpp msgid "Change Animation Length" @@ -320,7 +322,7 @@ msgstr "Изменить Путь Следования" #: editor/animation_track_editor.cpp msgid "Toggle this track on/off." -msgstr "Переключить этот трек вкл/выкл." +msgstr "Включить/выключить этот трек." #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" @@ -328,16 +330,15 @@ msgstr "Режим Обновления (Как это свойство уста #: editor/animation_track_editor.cpp msgid "Interpolation Mode" -msgstr "Режим Перехода" +msgstr "Режим интерполяции" #: editor/animation_track_editor.cpp msgid "Loop Wrap Mode (Interpolate end with beginning on loop)" -msgstr "" -"Режим Обработки Зацикливания (Переход заканчивается с началом нового цикла)" +msgstr "Режим зацикливания (интерполировать начало и конец при зацикливании)" #: editor/animation_track_editor.cpp msgid "Remove this track." -msgstr "Удалить этот трек." +msgstr "Удалить эту дорожку." #: editor/animation_track_editor.cpp msgid "Time (s): " @@ -403,7 +404,7 @@ msgstr "Изменить режим обновления анимации" #: editor/animation_track_editor.cpp msgid "Change Animation Interpolation Mode" -msgstr "Изменить режим интерполяции анимации" +msgstr "Изменить способ интерполяции анимации" #: editor/animation_track_editor.cpp msgid "Change Animation Loop Mode" @@ -463,7 +464,8 @@ msgstr "Переставить дорожки" #: editor/animation_track_editor.cpp msgid "Transform tracks only apply to Spatial-based nodes." -msgstr "Трек трансформации применяется только к основанным на Spatial узлам." +msgstr "" +"Дорожка преобразования применяется только к основанным на Spatial узлам." #: editor/animation_track_editor.cpp msgid "" @@ -472,14 +474,14 @@ msgid "" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" msgstr "" -"Aудио треки могут указывать только на узлы типа:\n" +"Аудио дорожки могут указывать только на узлы типа:\n" "-AudioStreamPlayer\n" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" #: editor/animation_track_editor.cpp msgid "Animation tracks can only point to AnimationPlayer nodes." -msgstr "Треки Анимации могут указывать только на узлы типа AnimationPlayer." +msgstr "Дорожки анимации могут указывать только на узлы типа AnimationPlayer." #: editor/animation_track_editor.cpp msgid "An animation player can't animate itself, only other players." @@ -487,11 +489,11 @@ msgstr "Проигрыватель анимации не может анимир #: editor/animation_track_editor.cpp msgid "Not possible to add a new track without a root" -msgstr "Нельзя добавить новый трек без корневого узла" +msgstr "Нельзя добавить новую дорожку без корневого узла" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "Неверный трек для кривой Безье (нет подходящих подсвойств)" +msgstr "Неверная дорожка для кривой Безье (нет подходящих подсвойств)" #: editor/animation_track_editor.cpp msgid "Add Bezier Track" @@ -499,11 +501,11 @@ msgstr "Добавить дорожку Безье" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a key." -msgstr "Путь трека некорректен, потому нельзя добавить ключ." +msgstr "Путь к дорожке некорректен, потому нельзя добавить ключ." #: editor/animation_track_editor.cpp msgid "Track is not of type Spatial, can't insert key" -msgstr "Трек не имеет тип Spatial, нельзя добавить ключ" +msgstr "Дорожка не имеет тип Spatial, нельзя добавить ключ" #: editor/animation_track_editor.cpp msgid "Add Transform Track Key" @@ -515,11 +517,11 @@ msgstr "Добавить ключ дорожки" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." -msgstr "Путь трека некорректен, потому нельзя добавить ключ метода." +msgstr "Путь к дорожке некорректен, потому нельзя добавить ключ метода." #: editor/animation_track_editor.cpp msgid "Add Method Track Key" -msgstr "Добавить ключ отслеживания метода" +msgstr "Добавить ключ дорожки для метода" #: editor/animation_track_editor.cpp msgid "Method not found in object: " @@ -546,7 +548,7 @@ msgid "" "This option does not work for Bezier editing, as it's only a single track." msgstr "" "Эта опция не работает для редактирования кривыми Безье, так как это только " -"один трек." +"одна дорожка." #: editor/animation_track_editor.cpp msgid "" @@ -561,14 +563,14 @@ msgid "" "files." msgstr "" "Данная анимация принадлежит импортированной сцене, поэтому изменения, " -"внесенные в импортированные треки, не будут сохранены.\n" +"внесенные в импортированные дорожки, не будут сохранены.\n" "\n" -"Чтобы активировать возможность добавления пользовательских треков, перейдите " -"к настройкам импорта сцены и установите\n" +"Чтобы активировать возможность добавления пользовательских дорожек, " +"перейдите к настройкам импорта сцены и установите\n" "\"Анимация > Хранилище\" в значение \"Файлы\", а также включите пункт " -"\"Анимация > Сохранять пользовательские треки\", и заново импортируйте " +"\"Анимация > Сохранять пользовательские дорожки\", и заново импортируйте " "сцену.\n" -"В качестве альтернативы используйте пресет импорта, который импортирует " +"В качестве альтернативы используйте шаблон импорта, который импортирует " "анимации в отдельные файлы." #: editor/animation_track_editor.cpp @@ -581,11 +583,11 @@ msgstr "Выберите узел AnimationPlayer для создания и р #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." -msgstr "Показывать треки только выделенных в дереве узлов." +msgstr "Показывать дорожки только выделенных в дереве узлов." #: editor/animation_track_editor.cpp msgid "Group tracks by node or display them as plain list." -msgstr "Группировать треки по узлам или показывать их как простой список." +msgstr "Группировать дорожки по узлам или показывать их как простой список." #: editor/animation_track_editor.cpp msgid "Snap:" @@ -619,7 +621,7 @@ msgstr "Свойства анимации." #: editor/animation_track_editor.cpp msgid "Copy Tracks" -msgstr "Копировать треки" +msgstr "Копировать дорожки" #: editor/animation_track_editor.cpp msgid "Scale Selection" @@ -635,7 +637,7 @@ msgstr "Дублировать выделенное" #: editor/animation_track_editor.cpp msgid "Duplicate Transposed" -msgstr "Дублировать и переместить" +msgstr "Дублировать и транспонировать" #: editor/animation_track_editor.cpp msgid "Delete Selection" @@ -825,7 +827,12 @@ msgstr "Номера строк и столбцов." #: editor/connections_dialog.cpp msgid "Method in target node must be specified." -msgstr "Метод должен быть указан в целевом узле." +msgstr "Метод в целевом узле должен быть указан." + +#: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Имя не является допустимым идентификатором:" #: editor/connections_dialog.cpp msgid "" @@ -837,7 +844,7 @@ msgstr "" #: editor/connections_dialog.cpp msgid "Connect to Node:" -msgstr "Присоединить к узлу:" +msgstr "Присоединить к Узлу:" #: editor/connections_dialog.cpp msgid "Connect to Script:" @@ -849,7 +856,7 @@ msgstr "От сигнала:" #: editor/connections_dialog.cpp msgid "Scene does not contain any script." -msgstr "Узел не содержит скрипт." +msgstr "Сцена не содержит каких-либо скриптов." #: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp #: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp @@ -870,7 +877,7 @@ msgstr "Удалить" #: editor/connections_dialog.cpp msgid "Add Extra Call Argument:" -msgstr "Добавить дополнительный параметр вызова:" +msgstr "Добавить дополнительный аргумент вызова:" #: editor/connections_dialog.cpp msgid "Extra Call Arguments:" @@ -956,7 +963,7 @@ msgstr "Подключить сигнал к методу" #: editor/connections_dialog.cpp msgid "Edit Connection:" -msgstr "Редактировать подключение:" +msgstr "Редактировать соединение:" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from the \"%s\" signal?" @@ -1093,7 +1100,7 @@ msgstr "Владельцы:" #: editor/dependency_editor.cpp msgid "Remove selected files from the project? (Can't be restored)" -msgstr "Удалить выбранные файлы из проекта? (Нельзя отменить!)" +msgstr "Удалить выбранные файлы из проекта? (Нельзя восстановить)" #: editor/dependency_editor.cpp msgid "" @@ -1522,7 +1529,7 @@ msgstr "Перестановка автозагрузок" #: editor/editor_autoload_settings.cpp msgid "Can't add autoload:" -msgstr "Нельзя добваить автозагрузку:" +msgstr "Не удаётся добавить автозагрузку:" #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -2482,7 +2489,7 @@ msgstr "Не возможно загрузить сцену, которая не #: editor/editor_node.cpp msgid "Reload Saved Scene" -msgstr "Перезагрузить сохранённую сцену" +msgstr "Перезагрузить сохраненную сцену" #: editor/editor_node.cpp msgid "" @@ -2768,12 +2775,12 @@ msgstr "Набор тайлов..." #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Undo" -msgstr "Отменить" +msgstr "Отменить (Undo)" #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Redo" -msgstr "Повторить" +msgstr "Повторить (Redo)" #: editor/editor_node.cpp msgid "Miscellaneous project or scene-wide tools." @@ -2930,7 +2937,7 @@ msgstr "Макет редактора" #: editor/editor_node.cpp msgid "Take Screenshot" -msgstr "Сделать снимок экрана" +msgstr "Сделать скриншот" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." @@ -3000,7 +3007,7 @@ msgstr "Сообщество" #: editor/editor_node.cpp msgid "About" -msgstr "О движке" +msgstr "О Godot Engine" #: editor/editor_node.cpp msgid "Play the project." @@ -3181,7 +3188,7 @@ msgstr "Открыть предыдущий редактор" #: editor/editor_node.h msgid "Warning!" -msgstr "Внимание!" +msgstr "Предупреждение!" #: editor/editor_path.cpp msgid "No sub-resources found." @@ -3290,7 +3297,7 @@ msgstr "[Пусто]" #: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp msgid "Assign..." -msgstr "Назначается..." +msgstr "Устанавливать.." #: editor/editor_properties.cpp msgid "Invalid RID" @@ -4025,7 +4032,7 @@ msgstr "Ошибка запуска пост-импорт скрипта:" #: editor/import/resource_importer_scene.cpp msgid "Did you return a Node-derived object in the `post_import()` method?" -msgstr "" +msgstr "Вы вернули производный от Node объект в методе `post_import ()`?" #: editor/import/resource_importer_scene.cpp msgid "Saving..." @@ -4243,7 +4250,7 @@ msgstr "Загрузка..." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Move Node Point" -msgstr "Передвинуть узел" +msgstr "Передвинуть точку узла" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Change BlendSpace1D Limits" @@ -4698,7 +4705,7 @@ msgstr "Переместить узел" #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition exists!" -msgstr "Переход уже существует!" +msgstr "Переход существует!" #: editor/plugins/animation_state_machine_editor.cpp msgid "Add Transition" @@ -5632,7 +5639,7 @@ msgstr "Масштаб при просмотре холста" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Translation mask for inserting keys." -msgstr "Маска перемещения для добавляемых ключей." +msgstr "Маска трансформации для вставки ключей." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation mask for inserting keys." @@ -5665,7 +5672,7 @@ msgstr "Автовставка ключа" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Animation Key and Pose Options" -msgstr "Настройки ключевых кадров и поз" +msgstr "Опции анимационных ключей и поз" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key (Existing Tracks)" @@ -5777,7 +5784,7 @@ msgstr "Маска излучения" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Solid Pixels" -msgstr "Сплошные пиксели" +msgstr "Залитые пиксели" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5923,16 +5930,15 @@ msgstr "Это не работает на корне сцены!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Static Shape" -msgstr "Создать треугольную сетку статической формы" +msgstr "Создать сетку статической формы" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Can't create a single convex collision shape for the scene root." -msgstr "" -"Не удается создать единственную выпуклую форму столкновения для корня сцены." +msgstr "Нельзя создать единую выпуклую форму столкновения для корня сцены." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Couldn't create a single convex collision shape." -msgstr "Не удалось создать одну выпуклую форму столкновений." +msgstr "Не удалось создать ни одной выпуклой формы столкновения." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Single Convex Shape" @@ -5945,11 +5951,11 @@ msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Couldn't create any collision shapes." -msgstr "Не удалось создать ни одной форму столкновения." +msgstr "Не удалось создать ни одну форму столкновения." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Multiple Convex Shapes" -msgstr "Создать несколько выпуклых форм" +msgstr "Создать нескольких выпуклых фигур" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -6035,7 +6041,7 @@ msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Multiple Convex Collision Siblings" -msgstr "Создать несколько соседних выпуклых форм столкновения" +msgstr "Создать выпуклую область столкновения" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -6056,10 +6062,10 @@ msgid "" "This can be used instead of the SpatialMaterial Grow property when using " "that property isn't possible." msgstr "" -"Создаёт статичную обводочную полисетку. Её нормали переворачиваются " -"автоматически.\n" -"Она может быть использована в случае, если использовать свойство Grow " -"материала SpatialMaterial не представляется возможным." +"Создать статичную контурную полисетку. Контурная полисетка будет иметь свои " +"нормали, перевернутые автоматически.\n" +"Можно использовать вместо свойства Grow в SpatialMaterial, в случае когда " +"оно не применимо." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" @@ -6974,7 +6980,6 @@ msgstr "" "'%s'." #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "[Ignore]" msgstr "(игнорировать)" @@ -7335,7 +7340,7 @@ msgstr "Выравнять преобразование с областью пр #: editor/plugins/spatial_editor_plugin.cpp msgid "Align Rotation with View" -msgstr "Выравнять поворот с областью просмотра" +msgstr "Совместить поворот с направлением взгляда" #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "No parent to instance a child at." @@ -7462,6 +7467,12 @@ msgid "" "Closed eye: Gizmo is hidden.\n" "Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")." msgstr "" +"Нажмите для переключения между состояниями видимости.\n" +"\n" +"Открытый глаз: Гизмо видно.\n" +"Закрытый глаз: Гизмо скрыто.\n" +"Полуоткрытый глаз: Гизмо также видно сквозь непрозрачные поверхности " +"(«рентген»)." #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes To Floor" @@ -7694,7 +7705,7 @@ msgstr "" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't replace by mesh." -msgstr "Некорректная геометрия, не может быть заменена сеткой." +msgstr "Недопустимая геометрия, не может быть заменена полисеткой." #: editor/plugins/sprite_editor_plugin.cpp msgid "Convert to Mesh2D" @@ -8597,7 +8608,7 @@ msgstr "Добавить входной порт" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add output port" -msgstr "Добавить выходной порт" +msgstr "Добавить исходящий порт" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Change input port type" @@ -8678,7 +8689,7 @@ msgstr "Показать полученный код шейдера." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Create Shader Node" -msgstr "Создать узел шейдера" +msgstr "Создать Шейдерный узел" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color function." @@ -8722,7 +8733,7 @@ msgstr "Оператор выцветания." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "HardLight operator." -msgstr "Оператор HardLight." +msgstr "Оператор жёсткого света." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Lighten operator." @@ -9239,7 +9250,7 @@ msgstr "Линейная интерполяция между двумя вект #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Linear interpolation between two vectors using scalar." -msgstr "Линейная интерполяция между двумя векторами с использованием скаляра." +msgstr "Линейная интерполяция между двумя векторами используя скаляр." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the normalize product of vector." @@ -10166,7 +10177,7 @@ msgstr "Настройки сохранены нормально." #: editor/project_settings_editor.cpp msgid "Moved Input Action Event" -msgstr "Событие ввода действия перемещено" +msgstr "Перенесите событие ввода действия" #: editor/project_settings_editor.cpp msgid "Override for Feature" @@ -10551,7 +10562,6 @@ msgid "Instance Child Scene" msgstr "Добавить дочернюю сцену" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" msgstr "Прикрепить скрипт" @@ -10724,6 +10734,9 @@ msgid "" "This is probably because this editor was built with all language modules " "disabled." msgstr "" +"Невозможно прикрепить скрипт: нет зарегистрированных языков.\n" +"Вероятно, это связано с тем, что этот редактор был построен с отключенными " +"всеми языковыми модулями." #: editor/scene_tree_dock.cpp msgid "Add Child Node" @@ -10774,12 +10787,10 @@ msgstr "" "не существует." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Attach a new or existing script to the selected node." msgstr "Прикрепить новый или существующий скрипт к выбранному узлу." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach the script from the selected node." msgstr "Убрать скрипт у выбранного узла." @@ -11387,7 +11398,7 @@ msgstr "Залить выделенную GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Paste Selection" -msgstr "Вставить выделенную сетку" +msgstr "Вставка выделенной сетки" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Paint" @@ -12008,7 +12019,6 @@ msgstr "" "предустановках." #: platform/android/export/export.cpp -#, fuzzy msgid "Release keystore incorrectly configured in the export preset." msgstr "" "Отладочная клавиатура не настроена ни в настройках редактора, ни в " @@ -12046,26 +12056,34 @@ msgid "" "Invalid \"GodotPaymentV3\" module included in the \"android/modules\" " "project setting (changed in Godot 3.2.2).\n" msgstr "" +"Недопустимый модуль «GodotPaymentV3», включенный в настройку проекта " +"«android/modules» (изменен в Godot 3.2.2).\n" #: platform/android/export/export.cpp msgid "\"Use Custom Build\" must be enabled to use the plugins." -msgstr "" +msgstr "«Use Custom Build» должен быть включен для использования плагинов." #: platform/android/export/export.cpp msgid "" "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR" "\"." msgstr "" +"«Степени свободы» действительны только тогда, когда «Xr Mode» - это «Oculus " +"Mobile VR»." #: platform/android/export/export.cpp msgid "" "\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." msgstr "" +"«Отслеживание рук» действует только тогда, когда «Xr Mode» - это «Oculus " +"Mobile VR»." #: platform/android/export/export.cpp msgid "" "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." msgstr "" +"«Осведомленность о фокусе» действительна только в том случае, если «Режим " +"Xr» - это «Oculus Mobile VR»." #: platform/android/export/export.cpp msgid "" @@ -12298,7 +12316,7 @@ msgstr "" #: scene/2d/light_occluder_2d.cpp msgid "The occluder polygon for this occluder is empty. Please draw a polygon." msgstr "" -"Заслоняющий полигон для этого окклюдера пуст. Пожалуйста, нарисуйте полигон." +"Заслоняющий полигон для этого окклюдера пуст. Пожалуйста, добавьте полигон." #: scene/2d/navigation_polygon.cpp msgid "" diff --git a/editor/translations/si.po b/editor/translations/si.po index 4d252a53d6..141696c00a 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -756,6 +756,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/sk.po b/editor/translations/sk.po index a341552d1c..0920487af3 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -756,6 +756,11 @@ msgid "Method in target node must be specified." msgstr "Metóda v target node-e musí byť špecifikovaná." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Metóda v target node-e musí byť špecifikovaná." + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/sl.po b/editor/translations/sl.po index faec304f67..114dce1e63 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -799,6 +799,11 @@ msgstr "Metoda v ciljnem gradniku mora biti navedena!" #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Ime ni pravilen identifikator:" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/sq.po b/editor/translations/sq.po index 5bcf15eb82..32d08c7bc9 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -744,6 +744,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index 4e7064f00c..01d8c4ca91 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -841,6 +841,11 @@ msgstr "Метода у циљаном чвору мора бити наведе #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Име није важећи идентификатор:" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index e62d152c45..fe13877f42 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -765,6 +765,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/sv.po b/editor/translations/sv.po index e316c74160..ddd0188d5d 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -772,6 +772,11 @@ msgstr "Metod i Mål-Node måste specificeras!" #: editor/connections_dialog.cpp #, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Metod i Mål-Node måste specificeras!" + +#: editor/connections_dialog.cpp +#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ta.po b/editor/translations/ta.po index b8ea8d3538..8f161acfc9 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -757,6 +757,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/te.po b/editor/translations/te.po index 589064278d..87fb947dd0 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -736,6 +736,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/th.po b/editor/translations/th.po index db7fd6adea..3af6fde5a0 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -744,6 +744,11 @@ msgid "Method in target node must be specified." msgstr "ต้องระบุเมธอดในโหนดเป้าหมาย" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "ไม่สามารถใช้ชื่อนี้ได้:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 277cc2c807..27886e1d4d 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -798,6 +798,11 @@ msgid "Method in target node must be specified." msgstr "Hedef düğümdeki metod tanımlanmalı." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Ad doğru bir belirleyici değil:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/uk.po b/editor/translations/uk.po index 75cce04e0e..66d7caab34 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -773,6 +773,11 @@ msgid "Method in target node must be specified." msgstr "Має бути вказано метод у цільовому вузлі." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Назва не є коректним ідентифікатором:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index 10558ad98e..6985cbdc39 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -746,6 +746,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/vi.po b/editor/translations/vi.po index fe846d5e08..ff214a7091 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -763,6 +763,11 @@ msgid "Method in target node must be specified." msgstr "Phương thức trong nút đích phải được chỉ định." #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "Phương thức trong nút đích phải được chỉ định." + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index 5dc2b5948f..4acf70b8ae 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -64,12 +64,14 @@ # binotaliu <binota@protonmail.ch>, 2020. # BinotaLIU <binota@protonmail.ch>, 2020. # Tim Bao <honiebao@gmail.com>, 2020. +# UnluckyNinja <unluckyninja1994@gmail.com>, 2020. +# 无双流 <1257678024@qq.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Chinese (Simplified) (Godot Engine)\n" "POT-Creation-Date: 2018-01-20 12:15+0200\n" -"PO-Revision-Date: 2020-06-15 01:48+0000\n" -"Last-Translator: Tim Bao <honiebao@gmail.com>\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" +"Last-Translator: 无双流 <1257678024@qq.com>\n" "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hans/>\n" "Language: zh_CN\n" @@ -77,7 +79,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -806,6 +808,11 @@ msgid "Method in target node must be specified." msgstr "必须指定目标节点的方法。" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "名称不是有效的标识符:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -2438,6 +2445,8 @@ msgid "" "The current scene has unsaved changes.\n" "Reload the saved scene anyway? This action cannot be undone." msgstr "" +"当前场景有未保存的更改。\n" +"是否重新加载保存的场景? 此操作无法撤消。" #: editor/editor_node.cpp msgid "Quick Run Scene..." @@ -2655,7 +2664,7 @@ msgstr "下一个标签页" #: editor/editor_node.cpp msgid "Previous tab" -msgstr "上一个标签页" +msgstr "上一个标签" #: editor/editor_node.cpp msgid "Filter Files..." @@ -2855,7 +2864,7 @@ msgstr "编辑器布局" #: editor/editor_node.cpp msgid "Take Screenshot" -msgstr "截取屏幕" +msgstr "截屏" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." @@ -3339,9 +3348,8 @@ msgid "Did you forget the '_run' method?" msgstr "您是否遗漏了_run()方法?" #: editor/editor_spin_slider.cpp -#, fuzzy msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes." -msgstr "按住Ctrl键放置一个Getter节点。按住Shift键放置一个通用签名。" +msgstr "按住Ctrl键来四舍五入至整数。 按住Shift键获取更精确的变化。" #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" @@ -3932,7 +3940,7 @@ msgstr "后处理脚本运行发生错误:" #: editor/import/resource_importer_scene.cpp msgid "Did you return a Node-derived object in the `post_import()` method?" -msgstr "" +msgstr "你是否在 `post_import()` 方法中返回了 Node 衍生对象?" #: editor/import/resource_importer_scene.cpp msgid "Saving..." @@ -6844,9 +6852,8 @@ msgid "" msgstr "未找到方法“%s”(连接于信号“%s”、来自节点“%s”、目标节点“%s”)。" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "[Ignore]" -msgstr "(忽略)" +msgstr "[忽略]" #: editor/plugins/script_text_editor.cpp msgid "Line" @@ -7276,27 +7283,27 @@ msgstr "使用GLES2渲染器时不可用。" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Left" -msgstr "自由视图 左" +msgstr "自由观看向左" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Right" -msgstr "自由视图 右" +msgstr "自由观看向右" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Forward" -msgstr "自由视图 前" +msgstr "自由观看向前" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Backwards" -msgstr "自由视图 后" +msgstr "自由观看向后" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Up" -msgstr "自由视图 上" +msgstr "自由观看向上" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Down" -msgstr "自由视图 下" +msgstr "自由观看向下" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Speed Modifier" @@ -7330,6 +7337,11 @@ msgid "" "Closed eye: Gizmo is hidden.\n" "Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")." msgstr "" +"点击以切换可见状态。\n" +"\n" +"睁眼:标志可见。\n" +"闭眼:标志隐藏。\n" +"半睁眼:标志也可穿过不透明的表面可见(“X光”)。" #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes To Floor" @@ -7359,11 +7371,11 @@ msgstr "使用吸附" #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View" -msgstr "底视图" +msgstr "仰视图。" #: editor/plugins/spatial_editor_plugin.cpp msgid "Top View" -msgstr "顶视图" +msgstr "俯视" #: editor/plugins/spatial_editor_plugin.cpp msgid "Rear View" @@ -7371,7 +7383,7 @@ msgstr "后视图" #: editor/plugins/spatial_editor_plugin.cpp msgid "Front View" -msgstr "前视图" +msgstr "正视图" #: editor/plugins/spatial_editor_plugin.cpp msgid "Left View" @@ -7383,7 +7395,7 @@ msgstr "右视图" #: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" -msgstr "切换投影/正交视图" +msgstr "切换透视图/正交视图" #: editor/plugins/spatial_editor_plugin.cpp msgid "Insert Animation Key" @@ -7399,7 +7411,7 @@ msgstr "聚焦选中项" #: editor/plugins/spatial_editor_plugin.cpp msgid "Toggle Freelook" -msgstr "切换自由观察模式" +msgstr "切换自由观看" #: editor/plugins/spatial_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp @@ -7408,7 +7420,7 @@ msgstr "变换" #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Object to Floor" -msgstr "将对象吸附到地板" +msgstr "吸附物体到地面" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Dialog..." @@ -10354,9 +10366,8 @@ msgid "Instance Child Scene" msgstr "实例化子场景" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" -msgstr "添加脚本" +msgstr "分离脚本" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." @@ -10519,6 +10530,8 @@ msgid "" "This is probably because this editor was built with all language modules " "disabled." msgstr "" +"无法附加脚本:没有语言被注册。\n" +"这可能是因为这个编辑器是在所有语言模块被关闭的状态下被构建的。" #: editor/scene_tree_dock.cpp msgid "Add Child Node" @@ -10567,14 +10580,12 @@ msgid "" msgstr "实例化场景文件为一个节点,如果没有根节点则创建一个继承自该文件的场景。" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Attach a new or existing script to the selected node." msgstr "为选中节点创建或设置脚本。" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach the script from the selected node." -msgstr "清除选中节点的脚本。" +msgstr "从选中节点分离脚本。" #: editor/scene_tree_dock.cpp msgid "Remote" @@ -11780,9 +11791,8 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset." msgstr "未在编辑器设置或预设中配置调试密钥库。" #: platform/android/export/export.cpp -#, fuzzy msgid "Release keystore incorrectly configured in the export preset." -msgstr "未在编辑器设置或预设中配置调试密钥库。" +msgstr "用于发布的密钥存储在导出预设中未被正确设置。" #: platform/android/export/export.cpp msgid "Custom build requires a valid Android SDK path in Editor Settings." @@ -11811,26 +11821,28 @@ msgid "" "Invalid \"GodotPaymentV3\" module included in the \"android/modules\" " "project setting (changed in Godot 3.2.2).\n" msgstr "" +"“android/modules”项目设置(变更于Godot 3.2.2)中包含了无效模" +"组“GodotPaymentV3”.\n" #: platform/android/export/export.cpp msgid "\"Use Custom Build\" must be enabled to use the plugins." -msgstr "" +msgstr "必须启用“使用自定义构建”才能使用插件。" #: platform/android/export/export.cpp msgid "" "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR" "\"." -msgstr "" +msgstr "“自由度”只有在当“Xr Mode”是“Oculus Mobile VR”时才有效。" #: platform/android/export/export.cpp msgid "" "\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." -msgstr "" +msgstr "“手部追踪”只有在当“Xr Mode”是“Oculus Mobile VR”时才有效。" #: platform/android/export/export.cpp msgid "" "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"." -msgstr "" +msgstr "“焦点感知”只有在当“Xr Mode”是“Oculus Mobile VR”时才有效。" #: platform/android/export/export.cpp msgid "" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index 4832307ce5..90c85892f6 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -793,6 +793,10 @@ msgid "Method in target node must be specified." msgstr "" #: editor/connections_dialog.cpp +msgid "Method name must be a valid identifier." +msgstr "" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index 22051058ad..129a3fdad4 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -28,7 +28,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-06-15 01:48+0000\n" +"PO-Revision-Date: 2020-06-22 06:40+0000\n" "Last-Translator: BinotaLIU <me@binota.org>\n" "Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hant/>\n" @@ -37,7 +37,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -766,6 +766,11 @@ msgid "Method in target node must be specified." msgstr "必須指定目標節點的方法。" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Method name must be a valid identifier." +msgstr "名稱不是一個有效的識別符:" + +#: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." @@ -9880,7 +9885,7 @@ msgstr "新增事件" #: editor/project_settings_editor.cpp msgid "Button" -msgstr "Button(按鈕)" +msgstr "Button (按鈕)" #: editor/project_settings_editor.cpp msgid "Left Button." |