1
0
Fork 0

gridmap control tweak

Currently, when making a selection with the gridmap, you can only change the height of the selection by changing the height of the mouse cursor while still dragging the selection.

(Height here meaning "the direction of the normal of the edit plane")

This change still allows you to change the cursor height while dragging the selection, but changes the height keys, while a selection is active and not being dragged, to change the selection instead of the mouse cursor.

This is much more convenient for a large amount of gridmap work, and the position of the mouse cursor can still be modified while a selection is active via ctrl+mouse wheel.

This is the minimally invasive way of making this change: A better option would be to move this functionality to an add'l menu action, (and perhaps also including actions to modify the other two axes by steps after the selection is made as well).
This commit is contained in:
MurderWho 2025-01-02 17:01:03 -03:30
parent 2582793d40
commit d6731ff69c
1 changed files with 7 additions and 4 deletions

View File

@ -61,18 +61,21 @@ void GridMapEditor::_configure() {
void GridMapEditor::_menu_option(int p_option) {
switch (p_option) {
case MENU_OPTION_PREV_LEVEL: {
floor->set_value(floor->get_value() - 1);
if (selection.active && input_action == INPUT_SELECT) {
if (selection.active && input_action != INPUT_SELECT) {
selection.current[edit_axis]--;
_validate_selection();
} else {
floor->set_value(floor->get_value() - 1);
}
} break;
case MENU_OPTION_NEXT_LEVEL: {
floor->set_value(floor->get_value() + 1);
if (selection.active && input_action == INPUT_SELECT) {
if (selection.active && input_action != INPUT_SELECT) {
selection.current[edit_axis]++;
_validate_selection();
} else {
floor->set_value(floor->get_value() + 1);
}
} break;