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

Method SetUpFromSaveData

Source/FubbleModule.cpp:492–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492void FubbleModule::SetUpFromSaveData()
493{
494 {
495 std::string controlPathH = mModuleSaveData.GetString("uicontrol_h");
496 if (!controlPathH.empty())
497 {
498 auto uicontrol = TheSynth->FindUIControl(controlPathH);
499 if (uicontrol)
500 {
501 mAxisH.GetCableSource()->SetTarget(uicontrol);
502 mAxisH.UpdateControl();
503 }
504 }
505 }
506
507 {
508 std::string controlPathV = mModuleSaveData.GetString("uicontrol_v");
509 if (!controlPathV.empty())
510 {
511 auto uicontrol = TheSynth->FindUIControl(controlPathV);
512 if (uicontrol)
513 {
514 mAxisV.GetCableSource()->SetTarget(uicontrol);
515 mAxisV.UpdateControl();
516 }
517 }
518 }
519
520 Resize(mModuleSaveData.GetInt("width"), mModuleSaveData.GetInt("height"));
521}
522
523void FubbleModule::SaveState(FileStreamOut& out)
524{

Callers

nothing calls this directly

Calls 7

GetStringMethod · 0.80
emptyMethod · 0.80
GetIntMethod · 0.80
FindUIControlMethod · 0.45
SetTargetMethod · 0.45
GetCableSourceMethod · 0.45
UpdateControlMethod · 0.45

Tested by

no test coverage detected