bool ParticleEditor::SaveSystem(char *oFilePathName, char *oFileName) { FILE_FORM_FILTER filter(GS_L("Particle effect file (*.par)"), GS_L("par")); std::string initDir = GetCurrentProjectPath(true) + "effects/"; Platform::FixSlashes(initDir); return SaveForm(filter, initDir.c_str(), oFilePathName, oFileName); }
LRESULT CPagePowerManagement::OnWizardBack() { InfWizardDlg* pSheet = (InfWizardDlg*)GetParent(); ASSERT_KINDOF(InfWizardDlg, pSheet); SaveForm(); return pSheet->m_BackDlgID; }
bool ProjectManager::SaveAs() { FILE_FORM_FILTER filter(GS_L("Ethanon Project files (*.ethproj)"), GS_L("ethproj")); char path[___OUTPUT_LENGTH], file[___OUTPUT_LENGTH]; std::string sLastDir = ReadLastDir(); if (SaveForm(filter, sLastDir.c_str(), path, file)) { std::string sOut; AddExtension(path, ".ethproj", sOut); std::ofstream ofs(sOut.c_str()); if (ofs.is_open()) { ofs << "Ethanon Engine project file"; ofs.close(); } SetCurrentFile(sOut.c_str()); SetCurrentProject(sOut.c_str()); SaveLastDir(Platform::GetFileDirectory(sOut.c_str()).c_str()); PrepareProjectDir(); } return true; }
bool ProjectManager::SaveAs() { char filter[] = "Ethanon Project files (*.ethproj)\0*.ethproj\0\0"; char path[___OUTPUT_LENGTH], file[___OUTPUT_LENGTH]; string sLastDir = ReadLastDir(); if (SaveForm(filter, "", path, file, sLastDir.c_str())) { string sOut; AddExtension(path, ".ethproj", sOut); std::ofstream ofs(sOut.c_str()); if (ofs.is_open()) { ofs << "Ethanon Engine project file"; ofs.close(); } SetCurrentFile(sOut.c_str()); SetCurrentProject(sOut.c_str()); SaveLastDir(ETHGlobal::GetPathName(sOut.c_str(), true).c_str()); PrepareProjectDir(); } return true; }