MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / GetOptionPosition

Method GetOptionPosition

Source/RadioButton.cpp:231–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231ofVec2f RadioButton::GetOptionPosition(int optionIndex)
232{
233 float x, y;
234 GetPosition(x, y, false);
235 if (mDirection == kRadioVertical)
236 return ofVec2f(x + mWidth, y + float(mHeight) / GetNumValues() * (optionIndex + .5f));
237 else //kRadioHorizontal
238 return ofVec2f(x + float(mWidth) / GetNumValues() * (optionIndex + .5f), y + mHeight);
239}
240
241void RadioButton::OnPulse(double time, float velocity, int flags)
242{

Callers 5

DrawModuleMethod · 0.80
PostRepatchMethod · 0.80
DrawModuleMethod · 0.80
GetPatchCablePosMethod · 0.80
DrawModuleMethod · 0.80

Calls 1

ofVec2fClass · 0.85

Tested by

no test coverage detected