std::string ProjectManager::DoEditor(SpritePtr pNextAppButton) { GSGUI_BUTTON file_r = PlaceFileMenu(); if (file_r.text == _S_NEW_PROJ) { SaveAs(); } if (file_r.text == _S_LOAD_PROJ) { Open(); } SetFileNameToTitle(m_provider->GetVideo(), _ETH_PROJECT_MANAGER_WINDOW_TITLE); if (GetCurrentProject() == "") { ShadowPrint(Vector2(64,128), GS_L("-Start a new project or load an existing one.\n") \ GS_L("-If you start a new project, all necessary files and paths will be copied to the target folder.\n") \ GS_L("-Media files (sprites, sounds, normals) should be manually placed into their correct directories.\n") \ GS_L("-Create .ENT entity files before building your scenes.\n")); } else { str_type::string currentProjectFilename = utf8::c(Platform::GetFileName(GetCurrentFile(false))).wc_str(); str_type::string sText = GS_L("Project loaded: ") + currentProjectFilename + GS_L("\n") + GS_L("We're ready to go. Press TAB or click the arrow to go to the Editors"); ShadowPrint(Vector2(64,128), sText.c_str()); } ProccessFileOpenRequests(); return GetCurrentProject(); }
std::string ParticleEditor::DoEditor(SpritePtr pNextAppButton) { if (!m_manager) CreateParticles(); const VideoPtr& video = m_provider->GetVideo(); video->SetCameraPos(Vector2(0,0)); video->SetBGColor(m_background); if (m_backgroundSprite) m_backgroundSprite->DrawShaped(Vector2(0,0), video->GetScreenSizeF(), gs2d::constant::WHITE, gs2d::constant::WHITE, gs2d::constant::WHITE, gs2d::constant::WHITE); ParticlePanel(); DrawParticleSystem(); SetFileNameToTitle(video, WINDOW_TITLE); return "particle"; }