Add option to bring back old Alt Tool functionality

This commit is contained in:
JannisX11 2021-07-01 21:05:02 +02:00
parent 797df76faf
commit ef5b5c1226
2 changed files with 3 additions and 3 deletions

View File

@ -492,7 +492,7 @@ window.addEventListener('focus', event => {
if (event.altKey && Toolbox.selected.alt_tool && !Toolbox.original && !open_interface) {
var orig = Toolbox.selected;
var alt = BarItems[Toolbox.selected.alt_tool];
if (alt && Condition(alt) && Modes.paint) {
if (alt && Condition(alt) && (Modes.paint || BarItems.swap_tools.keybind.key == 18)) {
alt.select()
Toolbox.original = orig;
}
@ -597,7 +597,7 @@ addEventListeners(document, 'keydown mousedown', function(e) {
//Alt Tool
var orig = Toolbox.selected;
var alt = BarItems[Toolbox.selected.alt_tool]
if (alt && Condition(alt) && Modes.paint) {
if (alt && Condition(alt) && (Modes.paint || BarItems.swap_tools.keybind.key == 18)) {
alt.select()
Toolbox.original = orig
}

View File

@ -1236,7 +1236,7 @@
selected.forEach(function(obj, i) {
if (obj.resizable) {
obj.resize(point[axis], axisNumber, !scope.direction, null, event.altKey || Pressing.overrides.alt)
obj.resize(point[axis], axisNumber, !scope.direction, null, (event.altKey || Pressing.overrides.alt) && BarItems.swap_tools.keybind.key != 18)
}
})
displayDistance(point[axis] * (scope.direction ? 1 : -1));