This doesn't work for me.
Code:
parameters.add(waveOrigin.set("wave origin", ofVec2f(-0.5f, 0.0f), ofVec2f(-0.5f, -0.5f), ofVec2f(0.5f, 0.5f))); waveOrigin.addListener(this, &shSharedResources::waveOriginListener); void shSharedResources::waveOriginListener(ofVec2f& _value) { float wox = _value.x; float woy = _value.y; int woxi = (int)(wox * 10.0f); int woyi = (int)(woy * 10.0f); _value.x = (float)woxi / 10.0f; _value.y = (float)woyi / 10.0f; waveOrigin.set(_value); }
I went and set a breakpoint to see if it got in the function, and it does perform that function. However, it does not update the GUI.
UPDATE: I figured it out, you can't get edit values of a ofParameter from it's listener function. Makes sense, really.