App::App() : BApplication(kAutoFilerSignature) { LoadFolders(); StartWatching(); }
bool AnimationSet2D::EndLoad() { // Actually load the folders and animations now if (!loadXMLFile_) return false; XMLElement rootElem = loadXMLFile_->GetRoot("spriter_data"); if (!LoadFolders(rootElem)) { loadXMLFile_.Reset(); return false; } XMLElement entityElem = rootElem.GetChild("entity"); if (!entityElem) { LOGERROR("Could not find entity"); loadXMLFile_.Reset(); return false; } for (XMLElement animationElem = entityElem.GetChild("animation"); animationElem; animationElem = animationElem.GetNext("animation")) { if (!LoadAnimation(animationElem)) { loadXMLFile_.Reset(); return false; } } loadXMLFile_.Reset(); return true; }
bool AnimationSet2D::BeginLoad(Deserializer& source) { loadXMLFile_ = new XMLFile(context_); if (!loadXMLFile_->Load(source)) { LOGERROR("Load XML failed " + source.GetName()); loadXMLFile_.Reset(); return false; } XMLElement rootElem = loadXMLFile_->GetRoot("spriter_data"); if (!rootElem) { LOGERROR("Invalid spriter file " + source.GetName()); loadXMLFile_.Reset(); return false; } // When async loading, preprocess folders for spritesheet / sprite files and request them for background loading if (GetAsyncLoadState() == ASYNC_LOADING) { if (!LoadFolders(rootElem)) { loadXMLFile_.Reset(); return false; } } return true; }
BOOL SpecialFolderEditor::OnInitDialog() { BOOL bRet = CEditor::OnInitDialog(); LoadFolders(); return bRet; }