From bed42c663d286d76a32f155049f9efabc2fdb73f Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 28 Apr 2019 20:48:43 -0400 Subject: [PATCH] New UI proto --- CameraPane.java | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index 8c8c173..55e5ab4 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -86,12 +86,14 @@ static boolean FULLSCREEN = false; static boolean SUPPORT = true; static boolean INERTIA = true; -static boolean FAST = false; +static boolean FAST = true; // false; static boolean SLOWPOSE = false; static boolean FOOTCONTACT = true; static int tickcount = 0; // slow pose issue +static boolean BUTTONLESSWHEEL = false; +static boolean ZOOMBOXMODE = false; static boolean BOXMODE = false; static boolean IMAGEFLIP = false; static boolean SMOOTHFOCUS = false; @@ -223,6 +225,11 @@ public boolean IsBoxMode() { return BOXMODE; + } + + public boolean IsZoomBoxMode() + { + return ZOOMBOXMODE; } public void ClearDepth() @@ -1612,12 +1619,12 @@ //col.getColorComponents(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), CameraPane.modelParams0); if (!material.multiply) { - display.color = color; + display.color = material.color; display.saturation = material.modulation; } else { - display.color *= color*2; + display.color *= material.color*2; display.saturation *= material.modulation*2; } @@ -2168,6 +2175,11 @@ public void ToggleBoxMode() { BOXMODE ^= true; + } + + public void ToggleZoomBoxMode() + { + ZOOMBOXMODE ^= true; } public void ToggleSmoothFocus() @@ -13523,6 +13535,7 @@ //System.err.println("Dtime = " + Dtime + "; units = " + e.getUnitsToScroll() + "; ratio (units/ms) = " + ratio); + if (BUTTONLESSWHEEL) if (Math.abs(ratio) < 0.1 || Math.abs(Dtime) == 0) // < 30) { return; @@ -13531,7 +13544,7 @@ boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); // TIMER - if (!wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR + if (ZOOMBOXMODE && !wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR { keepboxmode = BOXMODE; keepsupport = SUPPORT; @@ -13748,11 +13761,11 @@ public void mouseDragged(MouseEvent e) { + //System.out.println("mouseDragged: " + e); if (isRenderer) movingcamera = true; //if (drawing) //return; - //System.out.println("mouseDragged: " + e); if ((e.getModifiersEx() & CTRL) != 0 || (e.getModifiersEx() & COMMAND) != 0) // || IsFrozen()) { @@ -14287,7 +14300,6 @@ public void mouseMoved(MouseEvent e) { //System.out.println("mouseMoved: " + e); - if (isRenderer) return; @@ -15100,8 +15112,9 @@ protected void processMouseMotionEvent(MouseEvent e) { - //System.out.println("processMouseMotionEvent: " + mouseMode); - if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) + //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton()); + //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) + if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (mouseMode & SELECT) == 0) { mouseMoved(e); } else -- Gitblit v1.6.2