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

Method GetSaveData

Source/LocationZoomer.cpp:173–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173ofxJSONElement LocationZoomer::GetSaveData()
174{
175 ofxJSONElement save;
176 save.resize((unsigned int)mLocations.size());
177 int i = 0;
178 for (auto iter = mLocations.begin(); iter != mLocations.end(); ++iter)
179 {
180 const Location& loc = iter->second;
181 save[i]["shortcut"] = iter->first;
182 save[i]["zoomlevel"] = loc.mZoomLevel;
183 save[i]["offset_x"] = loc.mOffset.x;
184 save[i]["offset_y"] = loc.mOffset.y;
185 ++i;
186 }
187 return save;
188}
189
190void LocationZoomer::LoadFromSaveData(const ofxJSONElement& saveData)
191{

Callers 4

ReloadSaveDataMethod · 0.80
GetLayoutMethod · 0.80
SpawnModuleOnTheFlyMethod · 0.80
UpdateTargetFunction · 0.80

Calls 2

resizeMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected