From c5b599b48b333b34e554b464aefbca0b9bc66275 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 09 Jun 2019 02:04:44 -0400 Subject: [PATCH] Menu cleanup + transform feedback. --- CameraPane.java | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index 0d3d46b..9794f67 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -14374,6 +14374,7 @@ public void mouseReleased(MouseEvent e) { movingcamera = false; + X = Y = 0; //System.out.println("mouseReleased: " + e); clickEnd(e.getX(), e.getY(), e.getModifiersEx()); } @@ -15382,7 +15383,9 @@ info.bounds.setBounds(0, 0, (int) (width * zoom), (int) (height * zoom)); //Image img = CreateImage(width, height); //System.out.println("width = " + width + "; height = " + height + "\n"); + Graphics gr = g; // img.getGraphics(); + if (!hasMarquee) { if (Xmin < Xmax) // !locked) @@ -15480,14 +15483,28 @@ if (!isRenderer) { object.drawEditHandles(info, 0); + + if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0) + { + switch (object.selection.get(0).hitSomething) + { + case Object3D.hitCenter: gr.setColor(Color.pink); break; + case Object3D.hitRotate: gr.setColor(Color.green); break; + case Object3D.hitScale: gr.setColor(Color.cyan); break; + } + + gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); + } } } + if (isRenderer) { //gr.setColor(Color.black); //gr.drawRect(info.bounds.x - 1, info.bounds.y - 1, info.bounds.width + 1, info.bounds.height + 1); //gr.drawRect(info.bounds.x - 2, info.bounds.y - 2, info.bounds.width + 3, info.bounds.height + 3); } + if (hasMarquee) { gr.setXORMode(Color.white); -- Gitblit v1.6.2