MCPcopy Create free account
hub / github.com/ddnet/ddnet / CallbackSaveCopyMap

Method CallbackSaveCopyMap

src/game/editor/editor.cpp:168–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168bool CEditor::CallbackSaveCopyMap(const char *pFilename, int StorageType, void *pUser)
169{
170 dbg_assert(StorageType == IStorage::TYPE_SAVE, "Saving only allowed for IStorage::TYPE_SAVE");
171
172 CEditor *pEditor = static_cast<CEditor *>(pUser);
173
174 if(pEditor->Save(pFilename))
175 {
176 pEditor->OnDialogClose();
177 return true;
178 }
179 else
180 {
181 pEditor->ShowFileDialogError("Failed to save map to file '%s'.", pFilename);
182 return false;
183 }
184}
185
186bool CEditor::CallbackSaveImage(const char *pFilename, int StorageType, void *pUser)
187{

Callers

nothing calls this directly

Calls 3

ShowFileDialogErrorMethod · 0.80
SaveMethod · 0.45
OnDialogCloseMethod · 0.45

Tested by

no test coverage detected