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

Method GetModuleDimensions

Source/EffectChain.cpp:351–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351void EffectChain::GetModuleDimensions(float& width, float& height)
352{
353 int maxX = 100;
354 if (mShowSpawnList)
355 maxX += 100;
356 int maxY = 0;
357 for (int i = 0; i < mEffects.size(); ++i)
358 {
359 float x, y, w, h;
360 mEffects[i]->GetPosition(x, y, true);
361 mEffects[i]->GetDimensions(w, h);
362 w = MAX(w, MIN_EFFECT_WIDTH);
363 maxX = MAX(maxX, x + w);
364 maxY = MAX(maxY, y + h);
365 }
366 width = maxX + 10;
367 height = maxY + 24;
368}
369
370void EffectChain::KeyPressed(int key, bool isRepeat)
371{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
GetPositionMethod · 0.45
GetDimensionsMethod · 0.45

Tested by

no test coverage detected