Layout *SystemMenuResource::LoadLayout( const U8Archive &arc, const std::string &lytName ) { // read layout data u8 *stuff = arc.GetFile( "/arc/blyt/" + lytName + ".brlyt" ); if( !stuff ) { return NULL; } // load layout Layout *ret = new Layout; if( !ret->Load( stuff ) ) { delete ret; return NULL; } //ret->SetLanguage( "ENG" ); // load fonts and textures //ret->LoadFonts( U8Archive(SystemFont::GetFont(), SystemFont::GetFontSize()) ); ret->LoadFonts( arc ); if( !ret->LoadTextures( arc ) ) { delete ret; return NULL; } //gprintf( "loaded layout: \"%s\" %.2f x %.2f\n", lytName.c_str(), ret->GetWidth(), ret->GetHeight() ); return ret; }