| 171 | } |
| 172 | |
| 173 | ofxJSONElement 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 | |
| 190 | void LocationZoomer::LoadFromSaveData(const ofxJSONElement& saveData) |
| 191 | { |
no test coverage detected