MCPcopy Create free account
hub / github.com/Card-Forge/forge / isThemeValid

Method isThemeValid

forge-gui-mobile/src/forge/assets/FSkin.java:63–91  ·  view source on GitHub ↗
(FileHandle themeDir, String themeName, boolean silent)

Source from the content-addressed store, hash-verified

61 })), null, false, true));
62 }
63 public static boolean isThemeValid(FileHandle themeDir, String themeName, boolean silent) {
64 int missing = 0;
65 if (!themeDir.child("bg_splash.png").exists()) {
66 if (!silent)
67 System.err.println(themeDir + themeName + "/bg_splash.png not found.");
68 missing++;
69 }
70 if (!themeDir.child("bg_match.jpg").exists()) {
71 if (!silent)
72 System.err.println(themeDir + themeName + "/bg_match.jpg not found.");
73 missing++;
74 }
75 if (!themeDir.child("bg_texture.jpg").exists()) {
76 if (!silent)
77 System.err.println(themeDir + themeName + "/bg_texture.jpg not found.");
78 missing++;
79 }
80 if (!themeDir.child("sprite_icons.png").exists()) {
81 if (!silent)
82 System.err.println(themeDir + themeName + "/sprite_icons.png not found.");
83 missing++;
84 }
85 if (!themeDir.child("font1.ttf").exists()) {
86 if (!silent)
87 System.err.println(themeDir + themeName + "/font1.ttf not found.");
88 missing++;
89 }
90 return missing == 0;
91 }
92 private static void checkThemeDir(FileHandle themeDir, String themeName) {
93 if (themeDir == null || !themeDir.exists() || !themeDir.isDirectory()) {
94 System.err.println("Skin not found. Defaulting to fallback_skin.");

Callers 2

checkThemeDirMethod · 0.95
getSkinDirectoryNamesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected