Loads two sprites: the default (which should be a complete collection of all symbols) and the preferred (which may be incomplete). Font must be present in the skin folder, and will not be replaced by default. The fonts are pre-derived in this method and saved in a HashMap for future access. Color
(final SplashScreen splashScreen)
| 267 | * missing, the default picture is retrieved. |
| 268 | */ |
| 269 | public static void loadFull(final SplashScreen splashScreen) { |
| 270 | if (splashScreen != null) { |
| 271 | // Preferred skin name must be called via loadLight() method, |
| 272 | // which does some cleanup and init work. |
| 273 | if (FSkin.preferredName.isEmpty()) { FSkin.loadLight("default", splashScreen); } |
| 274 | } |
| 275 | |
| 276 | Forge.getAssets().avatars().clear(); |
| 277 | Forge.getAssets().sleeves().clear(); |
| 278 | |
| 279 | // Grab and test various sprite files. |
| 280 | final FileHandle f1 = getDefaultSkinFile(ForgeConstants.SPRITE_ICONS_FILE); |
| 281 | final FileHandle f2 = getSkinFile(ForgeConstants.SPRITE_ICONS_FILE); |
| 282 | final FileHandle f3 = getDefaultSkinFile(ForgeConstants.SPRITE_FOILS_FILE); |
| 283 | final FileHandle f4 = getDefaultSkinFile(ForgeConstants.SPRITE_AVATARS_FILE); |
| 284 | final FileHandle f5 = getSkinFile(ForgeConstants.SPRITE_AVATARS_FILE); |
| 285 | final FileHandle f6 = getDefaultSkinFile(ForgeConstants.SPRITE_OLD_FOILS_FILE); |
| 286 | final FileHandle f7 = getDefaultSkinFile(ForgeConstants.SPRITE_MANAICONS_FILE); |
| 287 | //final FileHandle f7b = getDefaultSkinFile(ForgeConstants.SPRITE_PHYREXIAN_FILE); |
| 288 | //final FileHandle f7c = getDefaultSkinFile(ForgeConstants.SPRITE_COLORLESS_HYBRID_FILE); |
| 289 | final FileHandle f8 = getDefaultSkinFile(ForgeConstants.SPRITE_SLEEVES_FILE); |
| 290 | final FileHandle f9 = getDefaultSkinFile(ForgeConstants.SPRITE_SLEEVES2_FILE); |
| 291 | final FileHandle f10 = getDefaultSkinFile(ForgeConstants.SPRITE_BORDER_FILE); |
| 292 | final FileHandle f11 = getSkinFile(ForgeConstants.SPRITE_BUTTONS_FILE); |
| 293 | final FileHandle f11b = getDefaultSkinFile(ForgeConstants.SPRITE_BUTTONS_FILE); |
| 294 | final FileHandle f12 = getSkinFile(ForgeConstants.SPRITE_START_FILE); |
| 295 | final FileHandle f12b = getDefaultSkinFile(ForgeConstants.SPRITE_START_FILE); |
| 296 | final FileHandle f13 = getDefaultSkinFile(ForgeConstants.SPRITE_DECKBOX_FILE); |
| 297 | final FileHandle f17 = getDefaultSkinFile(ForgeConstants.SPRITE_CRACKS_FILE); |
| 298 | final FileHandle f19 = getDefaultSkinFile(ForgeConstants.SPRITE_CURSOR_FILE); |
| 299 | final FileHandle f20 = getSkinFile(ForgeConstants.SPRITE_SLEEVES_FILE); |
| 300 | final FileHandle f21 = getSkinFile(ForgeConstants.SPRITE_SLEEVES2_FILE); |
| 301 | final FileHandle f22 = getDefaultSkinFile(ForgeConstants.SPRITE_ADV_BUTTONS_FILE); |
| 302 | final FileHandle f23 = getSkinFile(ForgeConstants.SPRITE_ADV_BUTTONS_FILE); |
| 303 | |
| 304 | /*TODO Themeable |
| 305 | final FileHandle f14 = getDefaultSkinFile(ForgeConstants.SPRITE_SETLOGO_FILE); |
| 306 | final FileHandle f15 = getSkinFile(ForgeConstants.SPRITE_SETLOGO_FILE); |
| 307 | final FileHandle f16 = getDefaultSkinFile(ForgeConstants.SPRITE_WATERMARK_FILE); |
| 308 | final FileHandle f24 = getSkinFile(ForgeConstants.SPRITE_ZONE_FILE); |
| 309 | final FileHandle f24b = getDefaultSkinFile(ForgeConstants.SPRITE_ZONE_FILE); |
| 310 | */ |
| 311 | |
| 312 | try { |
| 313 | Forge.getAssets().loadTexture(f1); |
| 314 | Pixmap adventureButtons; |
| 315 | if (f23.exists()) { |
| 316 | adventureButtons = new Pixmap(f23); |
| 317 | } else { |
| 318 | adventureButtons = new Pixmap(f22); |
| 319 | } |
| 320 | |
| 321 | Pixmap preferredIcons = new Pixmap(f1); |
| 322 | if (f2.exists()) { |
| 323 | Forge.getAssets().loadTexture(f2); |
| 324 | preferredIcons = new Pixmap(f2); |
| 325 | } |
| 326 |
no test coverage detected