| 223 | } |
| 224 | |
| 225 | void EETest::createUIThemeTextureAtlas() { |
| 226 | #if !defined( EE_DEBUG ) || defined( EE_GLES ) |
| 227 | return; |
| 228 | #endif |
| 229 | |
| 230 | std::string tgpath( MyPath + "ui/" + mThemeName ); |
| 231 | std::string Path( MyPath + "ui/" + mThemeName ); |
| 232 | |
| 233 | if ( !FileSystem::fileExists( tgpath + EE_TEXTURE_ATLAS_EXTENSION ) ) { |
| 234 | PixelDensitySize PD = PixelDensitySize::MDPI; |
| 235 | if ( mThemeName.find( "2x" ) != std::string::npos ) |
| 236 | PD = PixelDensitySize::XHDPI; |
| 237 | else if ( mThemeName.find( "1.5x" ) != std::string::npos ) |
| 238 | PD = PixelDensitySize::HDPI; |
| 239 | |
| 240 | TexturePacker tp( 2048, 2048, PixelDensity::toFloat( PD ), true, false, 2 ); |
| 241 | tp.addTexturesPath( Path ); |
| 242 | tp.packTextures(); |
| 243 | tp.save( tgpath + ".png", Image::SaveType::PNG ); |
| 244 | } else { |
| 245 | TextureAtlasLoader tgl; |
| 246 | tgl.updateTextureAtlas( tgpath + EE_TEXTURE_ATLAS_EXTENSION, Path ); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | void EETest::loadFonts() { |
| 251 | mFTE.restart(); |
nothing calls this directly
no test coverage detected