X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=BenMorrow.pde;h=c632b8df26ec66b57a2a059d62364505e0dcdebb;hb=efa0f27b8b4f6fbf16b2dc7aadf8164a7a0e3e97;hp=9294250cda3e5740a688ccfe61724de74c28c0dd;hpb=b18be7d34737efb183fdbb9bcd413451a9ac868f;p=SugarCubes.git diff --git a/BenMorrow.pde b/BenMorrow.pde index 9294250..c632b8d 100644 --- a/BenMorrow.pde +++ b/BenMorrow.pde @@ -151,13 +151,27 @@ class DriveableCrossSections extends CrossSections { if(interactive()) { - xd.setValue(x.getValue()/200); - yd.setValue(y.getValue()/200); - zd.setValue(z.getValue()/100); + copyValuesToKnobs(); + }else{ + copyKnobsToValues(); } } } + void copyValuesToKnobs() + { + xd.setValue(x.getValue()/200); + yd.setValue(y.getValue()/115); + zd.setValue(z.getValue()/100); + } + + void copyKnobsToValues() + { + x.setValue(xd.getValue()*200); + y.setValue(yd.getValue()*115); + z.setValue(zd.getValue()*100); + } + boolean interactive() { return Math.round(mode.getValuef())>0.5; @@ -168,10 +182,11 @@ class DriveableCrossSections extends CrossSections if(interactive()) { xv = xd.getValuef()*200; - yv = yd.getValuef()*200; + yv = yd.getValuef()*115; zv = zd.getValuef()*100; }else{ super.updateXYZVals(); + copyValuesToKnobs(); } }