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

Method UpdatePosition

Source/ModuleSaveDataPanel.cpp:270–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void ModuleSaveDataPanel::UpdatePosition()
271{
272 if (mSaveModule)
273 {
274 float moduleX, moduleY, moduleW, moduleH;
275 mSaveModule->GetPosition(moduleX, moduleY);
276 mSaveModule->GetDimensions(moduleW, moduleH);
277
278 SetPosition(moduleX + moduleW, moduleY);
279 }
280
281 if (mShowing)
282 mAppearAmount = ofClamp(mAppearAmount + ofGetLastFrameTime() * 5, 0, 1);
283 else
284 mAppearAmount = ofClamp(mAppearAmount - ofGetLastFrameTime() * 5, 0, 1);
285}
286
287void ModuleSaveDataPanel::ApplyChanges()
288{

Callers

nothing calls this directly

Calls 4

ofClampFunction · 0.85
ofGetLastFrameTimeFunction · 0.85
GetPositionMethod · 0.45
GetDimensionsMethod · 0.45

Tested by

no test coverage detected