diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 9 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.h | 1 | ||||
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 5 |
4 files changed, 20 insertions, 1 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 85237f64d9..f6ec217ce0 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -280,6 +280,13 @@ void ScriptTextEditor::_toggle_warning_pannel(const Ref<InputEvent> &p_event) { } } +void ScriptTextEditor::_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) { + 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()); @@ -1101,6 +1108,7 @@ void ScriptTextEditor::_bind_methods() { ClassDB::bind_method("_lookup_symbol", &ScriptTextEditor::_lookup_symbol); ClassDB::bind_method("_text_edit_gui_input", &ScriptTextEditor::_text_edit_gui_input); ClassDB::bind_method("_toggle_warning_pannel", &ScriptTextEditor::_toggle_warning_pannel); + ClassDB::bind_method("_error_pressed", &ScriptTextEditor::_error_pressed); ClassDB::bind_method("_warning_clicked", &ScriptTextEditor::_warning_clicked); ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed); @@ -1437,6 +1445,7 @@ ScriptTextEditor::ScriptTextEditor() { warnings_panel->set_focus_mode(FOCUS_CLICK); warnings_panel->hide(); + code_editor->get_error_label()->connect("gui_input", this, "_error_pressed"); code_editor->get_warning_label()->connect("gui_input", this, "_toggle_warning_pannel"); code_editor->get_warning_count_label()->connect("gui_input", this, "_toggle_warning_pannel"); warnings_panel->connect("meta_clicked", this, "_warning_clicked"); diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index 837201a947..7a9d531e1c 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -126,6 +126,7 @@ protected: void _load_theme_settings(); void _set_theme_for_script(); void _toggle_warning_pannel(const Ref<InputEvent> &p_event); + void _error_pressed(const Ref<InputEvent> &p_event); void _warning_clicked(Variant p_line); void _notification(int p_what); diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index d3a3289a18..c9367edec6 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -516,6 +516,12 @@ void TileMapEditor::_update_palette() { manual_palette->set_current(selected); manual_palette->show(); } + + if (tileset->tile_get_tile_mode(sel_tile) == TileSet::AUTO_TILE) { + manual_button->show(); + } else { + manual_button->hide(); + } } void TileMapEditor::_pick_tile(const Point2 &p_pos) { diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index cab9a4297d..e5551d385b 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -874,6 +874,9 @@ void TileSetEditor::_on_workspace_draw() { draw_edited_region_subdivision(); } else { int t_id = get_current_tile(); + if (t_id < 0) + return; + Rect2i region; if (draw_edited_region) region = edited_region; @@ -2260,7 +2263,7 @@ void TileSetEditor::update_workspace_tile_mode() { tool_editmode[EDITMODE_BITMASK]->hide(); tool_editmode[EDITMODE_PRIORITY]->hide(); tool_editmode[EDITMODE_Z_INDEX]->hide(); - } else if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::AUTO_TILE || tileset->tile_get_tile_mode(get_current_tile()) == TileSet::ATLAS_TILE) { + } else if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::AUTO_TILE) { if (edit_mode == EDITMODE_ICON) select_coord(tileset->autotile_get_icon_coordinate(get_current_tile())); else |