trying horizontal drag for knobs

master
zetaPRIME 2022-03-18 02:45:46 -04:00
parent bf793d20fd
commit 930992025d
2 changed files with 7 additions and 5 deletions

10
notes
View File

@ -32,15 +32,17 @@ parameters {
TODO {
immediate frontburner {
- SVFilter::normalize()
- AudioFrame::clamp()
revert action
distortion effect
}
shift+drag fine tuning for KnobGadget
KnobGadget rework {
switch to relative position per frame
shift+drag fine tuning
alt+drag to move reference point without changing value
global switch between horizontal and vertical
}
automation node {
listens for one specific param

View File

@ -137,7 +137,7 @@ void KnobGadget::mouseReleaseEvent(QGraphicsSceneMouseEvent* e) {
void KnobGadget::mouseMoveEvent(QGraphicsSceneMouseEvent* e) {
if (highlighted) {
auto tdelta = -(e->screenPos().y() - e->buttonDownScreenPos(Qt::LeftButton).y());
auto tdelta = (e->screenPos().x() - e->buttonDownScreenPos(Qt::LeftButton).x());
tdelta /= stepPx;
fSet(std::clamp(startVal + tdelta * step, min, max));
}