repositories
/
SugarCubes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b18be7d
)
Update DriveableCrossSections to show knob values live
author
Ben Morrow
<childoftv@gmail.com>
Mon, 19 Aug 2013 04:22:28 +0000
(21:22 -0700)
committer
Ben Morrow
<childoftv@gmail.com>
Mon, 19 Aug 2013 04:22:28 +0000
(21:22 -0700)
BenMorrow.pde
patch
|
blob
|
blame
|
history
diff --git
a/BenMorrow.pde
b/BenMorrow.pde
index 9294250cda3e5740a688ccfe61724de74c28c0dd..c632b8df26ec66b57a2a059d62364505e0dcdebb 100644
(file)
--- a/
BenMorrow.pde
+++ b/
BenMorrow.pde
@@
-151,13
+151,27
@@
class DriveableCrossSections extends CrossSections
{
if(interactive())
{
{
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;
boolean interactive()
{
return Math.round(mode.getValuef())>0.5;
@@
-168,10
+182,11
@@
class DriveableCrossSections extends CrossSections
if(interactive())
{
xv = xd.getValuef()*200;
if(interactive())
{
xv = xd.getValuef()*200;
- yv = yd.getValuef()*
200
;
+ yv = yd.getValuef()*
115
;
zv = zd.getValuef()*100;
}else{
super.updateXYZVals();
zv = zd.getValuef()*100;
}else{
super.updateXYZVals();
+ copyValuesToKnobs();
}
}
}
}