MCPcopy Create free account
hub / github.com/VCVRack/Befaco / onAction

Method onAction

src/MotionMTR.cpp:291–299  ·  view source on GitHub ↗

cycle through the values (with reset) on click only (not drag)

Source from the content-addressed store, hash-verified

289
290 // cycle through the values (with reset) on click only (not drag)
291 void onAction(const ActionEvent& e) override {
292 ParamQuantity* paramQuantity = getParamQuantity();
293 float range = paramQuantity->maxValue - paramQuantity->minValue;
294 float newValue = paramQuantity->getValue() + 1.f;
295 if (newValue > paramQuantity->maxValue) {
296 newValue -= range + 1.f;
297 }
298 paramQuantity->setValue(newValue);
299 }
300};
301
302

Callers

nothing calls this directly

Calls 2

getValueMethod · 0.80
setValueMethod · 0.80

Tested by

no test coverage detected