This commit is contained in:
huangyuhui
2016-01-03 19:22:40 +08:00
2 changed files with 3 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ if (!hasProperty('mainClass')) {
ext.mainClass = 'org.jackhuang.hellominecraft.launcher.Main' ext.mainClass = 'org.jackhuang.hellominecraft.launcher.Main'
} }
def buildnumber = System.getenv("BUILD_NUMBER") == null ? ".6" : "."+System.getenv("BUILD_NUMBER") def buildnumber = System.getenv("BUILD_NUMBER") == null ? ".7" : "."+System.getenv("BUILD_NUMBER")
String mavenGroupId = 'HMCL' String mavenGroupId = 'HMCL'
String mavenVersion = '2.3.5' + buildnumber String mavenVersion = '2.3.5' + buildnumber

View File

@@ -19,14 +19,11 @@ package org.jackhuang.hellominecraft.lookandfeel;
import java.awt.Color; import java.awt.Color;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Field;
import java.text.ParseException; import java.text.ParseException;
import java.util.Map; import java.util.Map;
import javax.swing.UIDefaults; import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.synth.SynthLookAndFeel; import javax.swing.plaf.synth.SynthLookAndFeel;
import org.jackhuang.hellominecraft.utils.NetUtils; import org.jackhuang.hellominecraft.utils.NetUtils;
import sun.swing.DefaultLookup;
/** /**
* *
@@ -48,10 +45,10 @@ public class HelloMinecraftLookAndFeel extends SynthLookAndFeel {
public HelloMinecraftLookAndFeel(Map<String, String> settings) throws ParseException { public HelloMinecraftLookAndFeel(Map<String, String> settings) throws ParseException {
try { try {
String s = NetUtils.getStreamContent(HelloMinecraftLookAndFeel.class.getResourceAsStream("/org/jackhuang/hellominecraft/lookandfeel/synth.xml")); String s = NetUtils.getStreamContent(HelloMinecraftLookAndFeel.class.getResourceAsStream("/org/jackhuang/hellominecraft/lookandfeel/synth.xml"), "UTF-8");
for (String ss : settings.keySet()) for (String ss : settings.keySet())
s = s.replace("${" + ss + "}", settings.get(ss)); s = s.replace("${" + ss + "}", settings.get(ss));
load(new ByteArrayInputStream(s.getBytes()), HelloMinecraftLookAndFeel.class); load(new ByteArrayInputStream(s.getBytes("UTF-8")), HelloMinecraftLookAndFeel.class);
} catch (IOException ex) { } catch (IOException ex) {
ex.printStackTrace(); ex.printStackTrace();
throw new ParseException("FUCKING BUG", 0); throw new ParseException("FUCKING BUG", 0);