Enable alt+mouse navigation
This commit is contained in:
+8
-1
@@ -65,7 +65,14 @@ class App {
|
||||
dropPath = dropPath.rtrim();
|
||||
});
|
||||
|
||||
// System.notifyOnApplicationState(function(){}, function(){}, function(){}, function(){}, function(){});
|
||||
System.notifyOnApplicationState(
|
||||
// Release alt after alt-tab
|
||||
function(){ @:privateAccess Input.getKeyboard().upListener(kha.input.KeyCode.Alt); }, // Foreground
|
||||
function(){}, // Resume
|
||||
function(){}, // Pause
|
||||
function(){}, // Background
|
||||
function(){} // Shutdown
|
||||
);
|
||||
|
||||
#if krom_windows
|
||||
// if (untyped Krom.setSaveAndQuitCallback != null) {
|
||||
|
||||
@@ -50,10 +50,10 @@ class Config {
|
||||
if (raw.keymap == null) {
|
||||
raw.keymap = {};
|
||||
raw.keymap.action_paint = "left";
|
||||
raw.keymap.action_rotate = "right";
|
||||
raw.keymap.action_rotate_light = "middle+shift";
|
||||
raw.keymap.action_pan = "middle";
|
||||
raw.keymap.action_zoom = "wheel";
|
||||
raw.keymap.action_rotate = "alt+left";
|
||||
raw.keymap.action_pan = "alt+middle";
|
||||
raw.keymap.action_zoom = "alt+right";
|
||||
raw.keymap.action_rotate_light = "shift+middle";
|
||||
raw.keymap.select_material = "shift+number";
|
||||
raw.keymap.cycle_layers = "ctrl+tab";
|
||||
raw.keymap.brush_radius = "f";
|
||||
|
||||
@@ -396,7 +396,7 @@ class Layers {
|
||||
public static function createFillLayer() {
|
||||
function makeFill(g:kha.graphics4.Graphics) {
|
||||
g.end();
|
||||
var l = newLayer();
|
||||
var l = newLayer(false);
|
||||
History.newLayer();
|
||||
l.objectMask = UITrait.inst.layerFilter;
|
||||
History.toFillLayer();
|
||||
|
||||
@@ -17,15 +17,15 @@ class Operator {
|
||||
}
|
||||
|
||||
public static function shortcut(s:String):Bool {
|
||||
var kb = Input.getKeyboard();
|
||||
var mouse = Input.getMouse();
|
||||
var flag = true;
|
||||
var plus = s.indexOf("+");
|
||||
if (plus > 0) {
|
||||
var shift = s.indexOf("shift") >= 0;
|
||||
var ctrl = s.indexOf("ctrl") >= 0;
|
||||
// var alt = s.indexOf("alt") >= 0;
|
||||
flag = shift == kb.down("shift") && ctrl == kb.down("control");
|
||||
var kb = Input.getKeyboard();
|
||||
var shift = s.indexOf("shift") >= 0;
|
||||
var ctrl = s.indexOf("ctrl") >= 0;
|
||||
var alt = s.indexOf("alt") >= 0;
|
||||
var flag = shift == kb.down("shift") &&
|
||||
ctrl == kb.down("control") &&
|
||||
alt == kb.down("alt");
|
||||
if (s.indexOf("+") > 0) {
|
||||
s = s.substr(s.lastIndexOf("+") + 1);
|
||||
}
|
||||
var key = (s == "left" || s == "right" || s == "middle") ? mouse.down(s) : kb.started(s);
|
||||
|
||||
@@ -38,48 +38,68 @@ class Camera {
|
||||
reset();
|
||||
}
|
||||
|
||||
var modif = kb.down("alt") || kb.down("shift") || kb.down("control") || Config.keymap.action_rotate == "middle";
|
||||
var controls = UITrait.inst.cameraControls;
|
||||
if (controls == 0) {
|
||||
if (controls == 0) { // Rotate
|
||||
if (Operator.shortcut(Config.keymap.action_rotate) || (mouse.down("right") && !modif)) {
|
||||
redraws = 2;
|
||||
var t = Context.object.transform;
|
||||
var up = t.up().normalize();
|
||||
t.rotate(up, mouse.movementX / 100);
|
||||
var right = camera.rightWorld().normalize();
|
||||
t.rotate(right, mouse.movementY / 100);
|
||||
t.buildMatrix();
|
||||
if (t.up().z < 0) {
|
||||
t.rotate(right, -mouse.movementY / 100);
|
||||
}
|
||||
}
|
||||
|
||||
if (Operator.shortcut(Config.keymap.action_pan) || (mouse.down("middle") && !modif)) {
|
||||
redraws = 2;
|
||||
var look = camera.transform.look().normalize().mult(mouse.movementY / 150);
|
||||
var right = camera.transform.right().normalize().mult(-mouse.movementX / 150);
|
||||
camera.transform.loc.add(look);
|
||||
camera.transform.loc.add(right);
|
||||
camera.buildMatrix();
|
||||
}
|
||||
|
||||
if (Operator.shortcut(Config.keymap.action_zoom)) {
|
||||
redraws = 2;
|
||||
camera.transform.move(camera.look(), -mouse.movementY / 150);
|
||||
}
|
||||
|
||||
if (mouse.wheelDelta != 0) {
|
||||
redraws = 2;
|
||||
camera.transform.move(camera.look(), mouse.wheelDelta * (-0.1));
|
||||
}
|
||||
|
||||
if (Operator.shortcut(Config.keymap.action_pan) || (mouse.down("right") && kb.down("space"))) {
|
||||
redraws = 2;
|
||||
if (kb.down("control")) {
|
||||
camera.transform.move(camera.look(), mouse.movementX / 75);
|
||||
}
|
||||
else {
|
||||
var look = camera.transform.look().normalize().mult(mouse.movementY / 150);
|
||||
var right = camera.transform.right().normalize().mult(-mouse.movementX / 150);
|
||||
camera.transform.loc.add(look);
|
||||
camera.transform.loc.add(right);
|
||||
camera.buildMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
if ((mouse.down("right") && !kb.down("space")) || (mouse.down("left") && kb.down("control"))) {
|
||||
redraws = 2;
|
||||
var t = Context.object.transform;
|
||||
|
||||
// Rotate X
|
||||
var up = t.up().normalize();
|
||||
t.rotate(up, mouse.movementX / 100);
|
||||
|
||||
// Rotate Y
|
||||
if (!kb.down("shift")) {
|
||||
var right = camera.rightWorld().normalize();
|
||||
t.rotate(right, mouse.movementY / 100);
|
||||
t.buildMatrix();
|
||||
|
||||
if (t.up().z < 0) {
|
||||
t.rotate(right, -mouse.movementY / 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (controls == 1) {
|
||||
else if (controls == 1) { // Orbit
|
||||
if (Operator.shortcut(Config.keymap.action_rotate) || (mouse.down("right") && !modif)) {
|
||||
redraws = 2;
|
||||
camera.transform.move(camera.lookWorld(), dist);
|
||||
camera.transform.rotate(new iron.math.Vec4(0, 0, 1), -mouse.movementX / 100);
|
||||
camera.transform.rotate(camera.rightWorld(), -mouse.movementY / 100);
|
||||
if (camera.upWorld().z < 0) {
|
||||
camera.transform.rotate(camera.rightWorld(), mouse.movementY / 100);
|
||||
}
|
||||
camera.transform.move(camera.lookWorld(), -dist);
|
||||
}
|
||||
|
||||
if (Operator.shortcut(Config.keymap.action_pan) || (mouse.down("middle") && !modif)) {
|
||||
redraws = 2;
|
||||
var look = camera.transform.look().normalize().mult(mouse.movementY / 150);
|
||||
var right = camera.transform.right().normalize().mult(-mouse.movementX / 150);
|
||||
camera.transform.loc.add(look);
|
||||
camera.transform.loc.add(right);
|
||||
camera.buildMatrix();
|
||||
}
|
||||
|
||||
if (Operator.shortcut(Config.keymap.action_zoom)) {
|
||||
redraws = 2;
|
||||
var f = -mouse.movementY / 150;
|
||||
camera.transform.move(camera.look(), f);
|
||||
dist -= f;
|
||||
}
|
||||
|
||||
if (mouse.wheelDelta != 0) {
|
||||
redraws = 2;
|
||||
@@ -88,47 +108,16 @@ class Camera {
|
||||
dist -= f;
|
||||
}
|
||||
|
||||
if (Operator.shortcut(Config.keymap.action_pan) || (mouse.down("right") && kb.down("space"))) {
|
||||
if (Operator.shortcut(Config.keymap.action_rotate_light)) {
|
||||
redraws = 2;
|
||||
if (kb.down("shift")) {
|
||||
var light = iron.Scene.active.lights[0];
|
||||
var m = iron.math.Mat4.identity();
|
||||
m.self = kha.math.FastMatrix4.rotationZ(mouse.movementX / 100);
|
||||
light.transform.local.multmat(m);
|
||||
light.transform.decompose();
|
||||
}
|
||||
else if (kb.down("control")) {
|
||||
var f = mouse.movementX / 75;
|
||||
camera.transform.move(camera.look(), f);
|
||||
dist -= f;
|
||||
}
|
||||
else {
|
||||
var look = camera.transform.look().normalize().mult(mouse.movementY / 150);
|
||||
var right = camera.transform.right().normalize().mult(-mouse.movementX / 150);
|
||||
camera.transform.loc.add(look);
|
||||
camera.transform.loc.add(right);
|
||||
camera.buildMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
if (Operator.shortcut(Config.keymap.action_rotate) || (mouse.down("left") && kb.down("control"))) {
|
||||
redraws = 2;
|
||||
camera.transform.move(camera.lookWorld(), dist);
|
||||
camera.transform.rotate(new iron.math.Vec4(0, 0, 1), -mouse.movementX / 100);
|
||||
|
||||
// Rotate Y
|
||||
if (!kb.down("shift")) {
|
||||
camera.transform.rotate(camera.rightWorld(), -mouse.movementY / 100);
|
||||
if (camera.upWorld().z < 0) {
|
||||
camera.transform.rotate(camera.rightWorld(), mouse.movementY / 100);
|
||||
}
|
||||
}
|
||||
|
||||
camera.transform.move(camera.lookWorld(), -dist);
|
||||
var light = iron.Scene.active.lights[0];
|
||||
var m = iron.math.Mat4.identity();
|
||||
m.self = kha.math.FastMatrix4.rotationZ(mouse.movementX / 100);
|
||||
light.transform.local.multmat(m);
|
||||
light.transform.decompose();
|
||||
}
|
||||
}
|
||||
else if (controls == 2 && Operator.shortcut(Config.keymap.action_rotate)) {
|
||||
|
||||
else if (controls == 2 && mouse.down("right")) {
|
||||
var moveForward = kb.down("w") || kb.down("up") || mouse.wheelDelta < 0;
|
||||
var moveBackward = kb.down("s") || kb.down("down") || mouse.wheelDelta > 0;
|
||||
var strafeLeft = kb.down("a") || kb.down("left");
|
||||
@@ -166,11 +155,9 @@ class Camera {
|
||||
}
|
||||
}
|
||||
|
||||
if (Operator.shortcut(Config.keymap.action_rotate)) {
|
||||
Context.ddirty = 2;
|
||||
camera.transform.rotate(Vec4.zAxis(), -mouse.movementX / 200);
|
||||
camera.transform.rotate(camera.right(), -mouse.movementY / 200);
|
||||
}
|
||||
Context.ddirty = 2;
|
||||
camera.transform.rotate(Vec4.zAxis(), -mouse.movementX / 200);
|
||||
camera.transform.rotate(camera.right(), -mouse.movementY / 200);
|
||||
}
|
||||
|
||||
if (redraws > 0) {
|
||||
|
||||
@@ -152,12 +152,32 @@ class TabPreferences {
|
||||
|
||||
ui.separator();
|
||||
if (ui.panel(Id.handle({selected: false}), "Keymap", 1)) {
|
||||
|
||||
var presetHandle = Id.handle();
|
||||
ui.combo(presetHandle, ["Default", "Blender"], "Preset", true);
|
||||
if (presetHandle.changed) {
|
||||
var preset = presetHandle.position;
|
||||
var keymap = Config.keymap;
|
||||
if (preset == 0) {
|
||||
keymap.action_rotate = "alt+left";
|
||||
keymap.action_pan = "alt+middle";
|
||||
keymap.action_zoom = "alt+right";
|
||||
}
|
||||
else if (preset == 1) {
|
||||
keymap.action_rotate = "middle";
|
||||
keymap.action_pan = "shift+middle";
|
||||
keymap.action_zoom = "ctrl+middle";
|
||||
}
|
||||
}
|
||||
ui.separator(8, false);
|
||||
|
||||
var i = 0;
|
||||
ui.changed = false;
|
||||
for (k in Reflect.fields(Config.keymap)) {
|
||||
var h = Id.handle().nest(i++, {text: Reflect.field(Config.keymap, k)});
|
||||
var t = ui.textInput(h, k, Left);
|
||||
Reflect.setField(Config.keymap, k, t);
|
||||
for (key in Reflect.fields(Config.keymap)) {
|
||||
var h = Id.handle().nest(i++);
|
||||
h.text = Reflect.field(Config.keymap, key);
|
||||
var text = ui.textInput(h, key, Left);
|
||||
Reflect.setField(Config.keymap, key, text);
|
||||
}
|
||||
if (ui.changed) Config.applyConfig();
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class UINodes {
|
||||
|
||||
if (!show) return;
|
||||
if (!App.uienabled) return;
|
||||
var keyboard = Input.getKeyboard();
|
||||
var kb = Input.getKeyboard();
|
||||
|
||||
var lay = Config.raw.ui_layout;
|
||||
wx = lay == 0 ? Std.int(iron.App.w()) : UITrait.inst.windowW;
|
||||
@@ -196,14 +196,14 @@ class UINodes {
|
||||
}
|
||||
|
||||
if (nodes.nodesSelected.length > 0) {
|
||||
if (keyboard.started("left")) for (n in nodes.nodesSelected) n.x -= 1;
|
||||
else if (keyboard.started("right")) for (n in nodes.nodesSelected) n.x += 1;
|
||||
if (keyboard.started("up")) for (n in nodes.nodesSelected) n.y -= 1;
|
||||
else if (keyboard.started("down")) for (n in nodes.nodesSelected) n.y += 1;
|
||||
if (kb.started("left")) for (n in nodes.nodesSelected) n.x -= 1;
|
||||
else if (kb.started("right")) for (n in nodes.nodesSelected) n.x += 1;
|
||||
if (kb.started("up")) for (n in nodes.nodesSelected) n.y -= 1;
|
||||
else if (kb.started("down")) for (n in nodes.nodesSelected) n.y += 1;
|
||||
}
|
||||
|
||||
// Node search popup
|
||||
if (keyboard.started(Config.keymap.node_search)) nodeSearch();
|
||||
if (kb.started(Config.keymap.node_search)) nodeSearch();
|
||||
if (nodeSearchSpawn != null) {
|
||||
ui.inputX = mouse.x + App.x(); // Fix inputDX after popup removal
|
||||
ui.inputY = mouse.y + App.y();
|
||||
@@ -212,7 +212,7 @@ class UINodes {
|
||||
}
|
||||
|
||||
function nodeSearch(x = -1, y = -1) {
|
||||
var keyboard = Input.getKeyboard();
|
||||
var kb = Input.getKeyboard();
|
||||
var searchHandle = Id.handle();
|
||||
var first = true;
|
||||
UIMenu.draw(function(ui:Zui) {
|
||||
@@ -236,7 +236,7 @@ class UINodes {
|
||||
if (ui.key == kha.input.KeyCode.Down && nodeSearchOffset < 6) nodeSearchOffset++;
|
||||
if (ui.key == kha.input.KeyCode.Up && nodeSearchOffset > 0) nodeSearchOffset--;
|
||||
}
|
||||
var enter = keyboard.down("enter");
|
||||
var enter = kb.down("enter");
|
||||
var count = 0;
|
||||
var BUTTON_COL = ui.t.BUTTON_COL;
|
||||
var nodeList = canvasType == 0 ? NodesMaterial.list : NodesBrush.list;
|
||||
|
||||
+39
-45
@@ -396,11 +396,6 @@ class UITrait {
|
||||
for (p in Plugin.plugins) if (p.update != null) p.update();
|
||||
|
||||
var kb = Input.getKeyboard();
|
||||
var shift = kb.down("shift");
|
||||
var ctrl = kb.down("control");
|
||||
var alt = kb.down("alt");
|
||||
alt = false; // TODO: gets stuck after alt+tab
|
||||
|
||||
if (!App.uibox.isTyping) {
|
||||
if (kb.started("escape")) {
|
||||
UIBox.show = false;
|
||||
@@ -479,7 +474,7 @@ class UITrait {
|
||||
!ui.isTyping && !UIView2D.inst.ui.isTyping && !UINodes.inst.ui.isTyping) {
|
||||
|
||||
if (worktab.position == SpacePaint) {
|
||||
if (shift) {
|
||||
if (kb.down("shift")) {
|
||||
if (kb.started("1")) Context.selectMaterial(0);
|
||||
else if (kb.started("2")) Context.selectMaterial(1);
|
||||
else if (kb.started("3")) Context.selectMaterial(2);
|
||||
@@ -488,7 +483,7 @@ class UITrait {
|
||||
else if (kb.started("6")) Context.selectMaterial(5);
|
||||
}
|
||||
|
||||
if (!ctrl && !mouse.down("right")) {
|
||||
if (!mouse.down("right")) { // Fly mode off
|
||||
if (Operator.shortcut(Config.keymap.tool_brush)) Context.selectTool(ToolBrush);
|
||||
else if (Operator.shortcut(Config.keymap.tool_eraser)) Context.selectTool(ToolEraser);
|
||||
else if (Operator.shortcut(Config.keymap.tool_fill)) Context.selectTool(ToolFill);
|
||||
@@ -503,48 +498,44 @@ class UITrait {
|
||||
}
|
||||
|
||||
// Radius
|
||||
if (!ctrl && !shift) {
|
||||
if (Context.tool == ToolBrush ||
|
||||
Context.tool == ToolEraser ||
|
||||
Context.tool == ToolDecal ||
|
||||
Context.tool == ToolText ||
|
||||
Context.tool == ToolClone ||
|
||||
Context.tool == ToolBlur ||
|
||||
Context.tool == ToolParticle) {
|
||||
if (Operator.shortcut(Config.keymap.brush_radius)) {
|
||||
brushCanLock = true;
|
||||
mouse.lock();
|
||||
lockStartedX = mouse.x + iron.App.x();
|
||||
lockStartedY = mouse.y + iron.App.y();
|
||||
}
|
||||
if (Context.tool == ToolBrush ||
|
||||
Context.tool == ToolEraser ||
|
||||
Context.tool == ToolDecal ||
|
||||
Context.tool == ToolText ||
|
||||
Context.tool == ToolClone ||
|
||||
Context.tool == ToolBlur ||
|
||||
Context.tool == ToolParticle) {
|
||||
if (Operator.shortcut(Config.keymap.brush_radius)) {
|
||||
brushCanLock = true;
|
||||
mouse.lock();
|
||||
lockStartedX = mouse.x + iron.App.x();
|
||||
lockStartedY = mouse.y + iron.App.y();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Viewpoint
|
||||
if (!shift && !alt) {
|
||||
if (Operator.shortcut(Config.keymap.view_reset)) {
|
||||
ViewportUtil.resetViewport();
|
||||
ViewportUtil.scaleToBounds();
|
||||
}
|
||||
else if (Operator.shortcut(Config.keymap.view_back)) ViewportUtil.setView(0, 1, 0, Math.PI / 2, 0, Math.PI);
|
||||
else if (Operator.shortcut(Config.keymap.view_front)) ViewportUtil.setView(0, -1, 0, Math.PI / 2, 0, 0);
|
||||
else if (Operator.shortcut(Config.keymap.view_left)) ViewportUtil.setView(-1, 0, 0, Math.PI / 2, 0, -Math.PI / 2);
|
||||
else if (Operator.shortcut(Config.keymap.view_right)) ViewportUtil.setView(1, 0, 0, Math.PI / 2, 0, Math.PI / 2);
|
||||
else if (Operator.shortcut(Config.keymap.view_bottom)) ViewportUtil.setView(0, 0, -1, Math.PI, 0, Math.PI);
|
||||
else if (Operator.shortcut(Config.keymap.view_top)) ViewportUtil.setView(0, 0, 1, 0, 0, 0);
|
||||
else if (Operator.shortcut(Config.keymap.view_camera_type)) {
|
||||
cameraType = cameraType == 0 ? 1 : 0;
|
||||
camHandle.position = cameraType;
|
||||
ViewportUtil.updateCameraType(cameraType);
|
||||
statusHandle.redraws = 2;
|
||||
}
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_left)) ViewportUtil.orbit(-Math.PI / 12, 0);
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_right)) ViewportUtil.orbit(Math.PI / 12, 0);
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_top)) ViewportUtil.orbit(0, -Math.PI / 12);
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_bottom)) ViewportUtil.orbit(0, Math.PI / 12);
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_opposite)) ViewportUtil.orbit(Math.PI, 0);
|
||||
if (Operator.shortcut(Config.keymap.view_reset)) {
|
||||
ViewportUtil.resetViewport();
|
||||
ViewportUtil.scaleToBounds();
|
||||
}
|
||||
else if (Operator.shortcut(Config.keymap.view_back)) ViewportUtil.setView(0, 1, 0, Math.PI / 2, 0, Math.PI);
|
||||
else if (Operator.shortcut(Config.keymap.view_front)) ViewportUtil.setView(0, -1, 0, Math.PI / 2, 0, 0);
|
||||
else if (Operator.shortcut(Config.keymap.view_left)) ViewportUtil.setView(-1, 0, 0, Math.PI / 2, 0, -Math.PI / 2);
|
||||
else if (Operator.shortcut(Config.keymap.view_right)) ViewportUtil.setView(1, 0, 0, Math.PI / 2, 0, Math.PI / 2);
|
||||
else if (Operator.shortcut(Config.keymap.view_bottom)) ViewportUtil.setView(0, 0, -1, Math.PI, 0, Math.PI);
|
||||
else if (Operator.shortcut(Config.keymap.view_top)) ViewportUtil.setView(0, 0, 1, 0, 0, 0);
|
||||
else if (Operator.shortcut(Config.keymap.view_camera_type)) {
|
||||
cameraType = cameraType == 0 ? 1 : 0;
|
||||
camHandle.position = cameraType;
|
||||
ViewportUtil.updateCameraType(cameraType);
|
||||
statusHandle.redraws = 2;
|
||||
}
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_left)) ViewportUtil.orbit(-Math.PI / 12, 0);
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_right)) ViewportUtil.orbit(Math.PI / 12, 0);
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_top)) ViewportUtil.orbit(0, -Math.PI / 12);
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_bottom)) ViewportUtil.orbit(0, Math.PI / 12);
|
||||
else if (Operator.shortcut(Config.keymap.view_orbit_opposite)) ViewportUtil.orbit(Math.PI, 0);
|
||||
}
|
||||
|
||||
if (brushCanLock || brushLocked) {
|
||||
@@ -578,8 +569,11 @@ class UITrait {
|
||||
|
||||
if (!App.uienabled) return;
|
||||
|
||||
var down = Operator.shortcut(Config.keymap.action_paint) || Input.getPen().down();
|
||||
if (down && !kb.down("control")) {
|
||||
var down = Operator.shortcut(Config.keymap.action_paint) ||
|
||||
(Operator.shortcut("alt+" + Config.keymap.action_paint) && Context.tool == ToolClone) ||
|
||||
Operator.shortcut(Config.keymap.brush_ruler + "+" + Config.keymap.action_paint) ||
|
||||
(Input.getPen().down() && !kb.down("alt"));
|
||||
if (down) {
|
||||
var mx = mouse.x;
|
||||
var my = mouse.y;
|
||||
if (paint2d) mx -= iron.App.w();
|
||||
|
||||
@@ -200,7 +200,9 @@ class UIView2D {
|
||||
if (panScale > 3.0) panScale = 3.0;
|
||||
}
|
||||
|
||||
if (type == 0 && m.down("left")) {
|
||||
if (type == 0 &&
|
||||
(Operator.shortcut(Config.keymap.action_paint) ||
|
||||
Operator.shortcut(Config.keymap.brush_ruler + "+" + Config.keymap.action_paint))) {
|
||||
UITrait.inst.paint2d = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user