//-------------------------------------------------------------- void ofxMuiNumberData::setRightOrLeftRangeLimit(float norm) { if(norm > getNormalizedValue()) { setNormalizedRangeMax(norm); } else { setNormalizedRangeMin(norm); } }
//-------------------------------------------------------------- void ofxMuiNumberData::setClosestRangeLimit(float norm) { float dMin = fabs(norm - getNormalizedRangeMin()); float dMax = fabs(norm - getNormalizedRangeMax()); if(dMin > dMax) { setNormalizedRangeMax(norm); } else { setNormalizedRangeMin(norm); } }
//-------------------------------------------------------------- void ofxMuiKnob::onDoublePress() { if(isCtrlPressed()) { setNormalizedRangeMin(0); setNormalizedRangeMax(1); } }