Renamed darkascension skin to dark_ascension (will be prettifying file names in settings soon).

Added better DNE degredation in FSkin.
This commit is contained in:
Doublestrike
2012-02-16 05:05:31 +00:00
parent 68f7bf4dfe
commit 9bace55ddd
7 changed files with 23 additions and 18 deletions

10
.gitattributes vendored
View File

@@ -10854,11 +10854,11 @@ res/quest/themes/Zombies[!!-~]B.thm -text
res/reprintSetInfo.py svneol=native#text/x-python res/reprintSetInfo.py svneol=native#text/x-python
res/sealed/juzamjedi.zsealed -text res/sealed/juzamjedi.zsealed -text
res/setInfoScript.py svneol=native#text/x-python res/setInfoScript.py svneol=native#text/x-python
res/skins/darkascension/bg_match.jpg -text res/skins/dark_ascension/bg_match.jpg -text
res/skins/darkascension/bg_splash.png -text res/skins/dark_ascension/bg_splash.png -text
res/skins/darkascension/bg_texture.jpg -text res/skins/dark_ascension/bg_texture.jpg -text
res/skins/darkascension/font1.ttf -text res/skins/dark_ascension/font1.ttf -text
res/skins/darkascension/sprite_icons.png -text res/skins/dark_ascension/sprite_icons.png -text
res/skins/default/bg_match.jpg -text res/skins/default/bg_match.jpg -text
res/skins/default/bg_splash.png -text res/skins/default/bg_splash.png -text
res/skins/default/bg_texture.jpg -text res/skins/default/bg_texture.jpg -text

View File

Before

Width:  |  Height:  |  Size: 359 KiB

After

Width:  |  Height:  |  Size: 359 KiB

View File

Before

Width:  |  Height:  |  Size: 389 KiB

After

Width:  |  Height:  |  Size: 389 KiB

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 260 KiB

View File

@@ -365,22 +365,27 @@ public enum FSkin {
FSkin.colors = new HashMap<SkinProp, Color>(); FSkin.colors = new HashMap<SkinProp, Color>();
final File f = new File(preferredDir + FILE_SPLASH); final File f = new File(preferredDir + FILE_SPLASH);
final BufferedImage img; if (!f.exists()) {
try { FSkin.loadLight("default");
img = ImageIO.read(f); }
else {
final BufferedImage img;
try {
img = ImageIO.read(f);
final int h = img.getHeight(); final int h = img.getHeight();
final int w = img.getWidth(); final int w = img.getWidth();
FSkin.setIcon(Backgrounds.BG_SPLASH, img.getSubimage(0, 0, w, h - 100)); FSkin.setIcon(Backgrounds.BG_SPLASH, img.getSubimage(0, 0, w, h - 100));
UIManager.put("ProgressBar.background", FSkin.getColorFromPixel(img.getRGB(25, h - 75))); UIManager.put("ProgressBar.background", FSkin.getColorFromPixel(img.getRGB(25, h - 75)));
UIManager.put("ProgressBar.selectionBackground", FSkin.getColorFromPixel(img.getRGB(75, h - 75))); UIManager.put("ProgressBar.selectionBackground", FSkin.getColorFromPixel(img.getRGB(75, h - 75)));
UIManager.put("ProgressBar.foreground", FSkin.getColorFromPixel(img.getRGB(25, h - 25))); UIManager.put("ProgressBar.foreground", FSkin.getColorFromPixel(img.getRGB(25, h - 25)));
UIManager.put("ProgressBar.selectionForeground", FSkin.getColorFromPixel(img.getRGB(75, h - 25))); UIManager.put("ProgressBar.selectionForeground", FSkin.getColorFromPixel(img.getRGB(75, h - 25)));
UIManager.put("ProgressBar.border", new LineBorder(Color.BLACK, 0)); UIManager.put("ProgressBar.border", new LineBorder(Color.BLACK, 0));
} catch (final IOException e) { } catch (final IOException e) {
e.printStackTrace(); e.printStackTrace();
}
} }
} }