mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-09 12:29:35 +01:00
Use control instead of metakey as intended in the layered tilemap editors.
This commit is contained in:
parent
7789b60b2b
commit
29ab4bf2c8
@ -1097,14 +1097,14 @@ void TileDataDefaultEditor::forward_painting_atlas_gui_input(LayeredTileAtlasVie
|
|||||||
if (mb.is_valid()) {
|
if (mb.is_valid()) {
|
||||||
if (mb->get_button_index() == BUTTON_LEFT) {
|
if (mb->get_button_index() == BUTTON_LEFT) {
|
||||||
if (mb->is_pressed()) {
|
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);
|
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);
|
coords = p_tile_set_atlas_source->get_tile_at_coords(coords);
|
||||||
if (coords != LayeredTileSetSource::INVALID_ATLAS_COORDS) {
|
if (coords != LayeredTileSetSource::INVALID_ATLAS_COORDS) {
|
||||||
_set_painted_value(p_tile_set_atlas_source, coords, 0);
|
_set_painted_value(p_tile_set_atlas_source, coords, 0);
|
||||||
picker_button->set_pressed(false);
|
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_type = DRAG_TYPE_PAINT_RECT;
|
||||||
drag_modified.clear();
|
drag_modified.clear();
|
||||||
drag_painted_value = _get_painted_value();
|
drag_painted_value = _get_painted_value();
|
||||||
@ -2263,7 +2263,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(LayeredTileAtlasVi
|
|||||||
if (mb.is_valid()) {
|
if (mb.is_valid()) {
|
||||||
if (mb->get_button_index() == BUTTON_LEFT || mb->get_button_index() == BUTTON_RIGHT) {
|
if (mb->get_button_index() == BUTTON_LEFT || mb->get_button_index() == BUTTON_RIGHT) {
|
||||||
if (mb->is_pressed()) {
|
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());
|
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);
|
coords = p_tile_set_atlas_source->get_tile_at_coords(coords);
|
||||||
if (coords != LayeredTileSetSource::INVALID_ATLAS_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) {
|
if (mb->get_button_index() == BUTTON_RIGHT) {
|
||||||
terrain_set = -1;
|
terrain_set = -1;
|
||||||
}
|
}
|
||||||
if (mb->get_metakey() && mb->get_shift()) {
|
if (mb->get_control() && mb->get_shift()) {
|
||||||
// Paint terrain set with rect.
|
// Paint terrain set with rect.
|
||||||
drag_type = DRAG_TYPE_PAINT_TERRAIN_SET_RECT;
|
drag_type = DRAG_TYPE_PAINT_TERRAIN_SET_RECT;
|
||||||
drag_modified.clear();
|
drag_modified.clear();
|
||||||
@ -2347,7 +2347,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(LayeredTileAtlasVi
|
|||||||
if (mb->get_button_index() == BUTTON_RIGHT) {
|
if (mb->get_button_index() == BUTTON_RIGHT) {
|
||||||
terrain = -1;
|
terrain = -1;
|
||||||
}
|
}
|
||||||
if (mb->get_metakey() && mb->get_shift()) {
|
if (mb->get_control() && mb->get_shift()) {
|
||||||
// Paint terrain bits with rect.
|
// Paint terrain bits with rect.
|
||||||
drag_type = DRAG_TYPE_PAINT_TERRAIN_BITS_RECT;
|
drag_type = DRAG_TYPE_PAINT_TERRAIN_BITS_RECT;
|
||||||
drag_modified.clear();
|
drag_modified.clear();
|
||||||
|
@ -731,7 +731,7 @@ bool LayeredTileMapLayerEditorTilesPlugin::forward_canvas_gui_input(const Ref<In
|
|||||||
}
|
}
|
||||||
} else if (tool_buttons_group->get_pressed_button() == select_tool_button) {
|
} else if (tool_buttons_group->get_pressed_button() == select_tool_button) {
|
||||||
drag_start_mouse_pos = mpos;
|
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
|
// Move the selection
|
||||||
_update_selection_pattern_from_tilemap_selection(); // Make sure the pattern is up to date before moving.
|
_update_selection_pattern_from_tilemap_selection(); // Make sure the pattern is up to date before moving.
|
||||||
drag_type = DRAG_TYPE_MOVE;
|
drag_type = DRAG_TYPE_MOVE;
|
||||||
|
@ -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_button_group->get_pressed_button() == tool_setup_atlas_source_button) {
|
||||||
if (tools_settings_erase_button->is_pressed()) {
|
if (tools_settings_erase_button->is_pressed()) {
|
||||||
// Erasing
|
// Erasing
|
||||||
if (mb->get_metakey() || mb->get_shift()) {
|
if (mb->get_control() || mb->get_shift()) {
|
||||||
// Remove tiles using rect.
|
// Remove tiles using rect.
|
||||||
|
|
||||||
// Setup the dragging info.
|
// Setup the dragging info.
|
||||||
@ -1278,7 +1278,7 @@ void LayeredTileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<In
|
|||||||
// Create a tile.
|
// Create a tile.
|
||||||
tile_set_atlas_source->create_tile(coords);
|
tile_set_atlas_source->create_tile(coords);
|
||||||
}
|
}
|
||||||
} else if (mb->get_metakey()) {
|
} else if (mb->get_control()) {
|
||||||
// Create tiles using rect.
|
// Create tiles using rect.
|
||||||
drag_type = DRAG_TYPE_CREATE_TILES_USING_RECT;
|
drag_type = DRAG_TYPE_CREATE_TILES_USING_RECT;
|
||||||
drag_start_mouse_pos = mouse_local_pos;
|
drag_start_mouse_pos = mouse_local_pos;
|
||||||
|
Loading…
Reference in New Issue
Block a user