Use control instead of metakey as intended in the layered tilemap editors.

This commit is contained in:
Relintai 2024-03-12 23:26:04 +01:00
parent 7789b60b2b
commit 29ab4bf2c8
3 changed files with 8 additions and 8 deletions

View File

@ -1097,14 +1097,14 @@ void TileDataDefaultEditor::forward_painting_atlas_gui_input(LayeredTileAtlasVie
if (mb.is_valid()) {
if (mb->get_button_index() == BUTTON_LEFT) {
if (mb->is_pressed()) {
if (picker_button->is_pressed() || (mb->get_metakey() && !mb->get_shift())) {
if (picker_button->is_pressed() || (mb->get_control() && !mb->get_shift())) {
Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position(), true);
coords = p_tile_set_atlas_source->get_tile_at_coords(coords);
if (coords != LayeredTileSetSource::INVALID_ATLAS_COORDS) {
_set_painted_value(p_tile_set_atlas_source, coords, 0);
picker_button->set_pressed(false);
}
} else if (mb->get_metakey() && mb->get_shift()) {
} else if (mb->get_control() && mb->get_shift()) {
drag_type = DRAG_TYPE_PAINT_RECT;
drag_modified.clear();
drag_painted_value = _get_painted_value();
@ -2263,7 +2263,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(LayeredTileAtlasVi
if (mb.is_valid()) {
if (mb->get_button_index() == BUTTON_LEFT || mb->get_button_index() == BUTTON_RIGHT) {
if (mb->is_pressed()) {
if (picker_button->is_pressed() || (mb->get_metakey() && !mb->get_shift())) {
if (picker_button->is_pressed() || (mb->get_control() && !mb->get_shift())) {
Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position());
coords = p_tile_set_atlas_source->get_tile_at_coords(coords);
if (coords != LayeredTileSetSource::INVALID_ATLAS_COORDS) {
@ -2306,7 +2306,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(LayeredTileAtlasVi
if (mb->get_button_index() == BUTTON_RIGHT) {
terrain_set = -1;
}
if (mb->get_metakey() && mb->get_shift()) {
if (mb->get_control() && mb->get_shift()) {
// Paint terrain set with rect.
drag_type = DRAG_TYPE_PAINT_TERRAIN_SET_RECT;
drag_modified.clear();
@ -2347,7 +2347,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(LayeredTileAtlasVi
if (mb->get_button_index() == BUTTON_RIGHT) {
terrain = -1;
}
if (mb->get_metakey() && mb->get_shift()) {
if (mb->get_control() && mb->get_shift()) {
// Paint terrain bits with rect.
drag_type = DRAG_TYPE_PAINT_TERRAIN_BITS_RECT;
drag_modified.clear();

View File

@ -731,7 +731,7 @@ bool LayeredTileMapLayerEditorTilesPlugin::forward_canvas_gui_input(const Ref<In
}
} else if (tool_buttons_group->get_pressed_button() == select_tool_button) {
drag_start_mouse_pos = mpos;
if (tile_map_selection.has(tile_set->local_to_map(drag_start_mouse_pos)) && !mb->get_shift() && !mb->get_metakey()) {
if (tile_map_selection.has(tile_set->local_to_map(drag_start_mouse_pos)) && !mb->get_shift() && !mb->get_control()) {
// Move the selection
_update_selection_pattern_from_tilemap_selection(); // Make sure the pattern is up to date before moving.
drag_type = DRAG_TYPE_MOVE;

View File

@ -1239,7 +1239,7 @@ void LayeredTileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<In
if (tools_button_group->get_pressed_button() == tool_setup_atlas_source_button) {
if (tools_settings_erase_button->is_pressed()) {
// Erasing
if (mb->get_metakey() || mb->get_shift()) {
if (mb->get_control() || mb->get_shift()) {
// Remove tiles using rect.
// Setup the dragging info.
@ -1278,7 +1278,7 @@ void LayeredTileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<In
// Create a tile.
tile_set_atlas_source->create_tile(coords);
}
} else if (mb->get_metakey()) {
} else if (mb->get_control()) {
// Create tiles using rect.
drag_type = DRAG_TYPE_CREATE_TILES_USING_RECT;
drag_start_mouse_pos = mouse_local_pos;