mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-25 04:04:25 +00:00
Compare commits
1
Commits
1.1.0
...
GUI-archive
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
546caf028a |
No files matched your search
@@ -8,7 +8,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
public class CustomSkinLoaderGUI {
|
public class CustomSkinLoaderGUI {
|
||||||
|
|
||||||
public static final String VERSION ="1.1.0";
|
public static final String VERSION ="1.1.1";
|
||||||
|
|
||||||
public static final Logger log=Logger.getLogger("CustomSkinLoader-GUI");
|
public static final Logger log=Logger.getLogger("CustomSkinLoader-GUI");
|
||||||
public static final File LCK=new File("GUI.lck");
|
public static final File LCK=new File("GUI.lck");
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package idv.jlchntoz;
|
|||||||
public class Version {
|
public class Version {
|
||||||
private String version;
|
private String version;
|
||||||
private long longVersion;
|
private long longVersion;
|
||||||
|
|
||||||
public Version(String version){
|
public Version(String version){
|
||||||
this.version=version;
|
this.version=version;
|
||||||
longVersion=getLongVersion(version);
|
longVersion=getLongVersion(version);
|
||||||
@@ -20,15 +21,24 @@ public class Version {
|
|||||||
//System.out.println(temp1);
|
//System.out.println(temp1);
|
||||||
return temp1;
|
return temp1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getVersion(){
|
public String getVersion(){
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
public long getLongVersion(){
|
public long getLongVersion(){
|
||||||
return longVersion;
|
return longVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isNewerThan(Version compareVersion){
|
||||||
|
return longVersion>compareVersion.getLongVersion();
|
||||||
|
}
|
||||||
public boolean isNewerThan(String compareVersion){
|
public boolean isNewerThan(String compareVersion){
|
||||||
return longVersion>getLongVersion(compareVersion);
|
return longVersion>getLongVersion(compareVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isNewerThanOrEquals(Version compareVersion){
|
||||||
|
return longVersion>=compareVersion.getLongVersion();
|
||||||
|
}
|
||||||
public boolean isNewerThanOrEquals(String compareVersion){
|
public boolean isNewerThanOrEquals(String compareVersion){
|
||||||
return longVersion>=getLongVersion(compareVersion);
|
return longVersion>=getLongVersion(compareVersion);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ public class SkinFrame {
|
|||||||
|
|
||||||
public static final String[] urls0={
|
public static final String[] urls0={
|
||||||
"#"+lang.minecraftOffical(),
|
"#"+lang.minecraftOffical(),
|
||||||
"http://s3.amazonaws.com/MinecraftSkins/*.png",
|
|
||||||
"http://skins.minecraft.net/MinecraftSkins/*.png",
|
"http://skins.minecraft.net/MinecraftSkins/*.png",
|
||||||
|
"http://s3.amazonaws.com/MinecraftSkins/*.png",
|
||||||
"#MineCrack",
|
"#MineCrack",
|
||||||
"http://minecrack.fr.nf/mc/skinsminecrackd/*.png",
|
"http://minecrack.fr.nf/mc/skinsminecrackd/*.png",
|
||||||
/*
|
/*
|
||||||
@@ -43,8 +43,8 @@ public class SkinFrame {
|
|||||||
};
|
};
|
||||||
public static final String[] urls1={
|
public static final String[] urls1={
|
||||||
"#"+lang.minecraftOffical(),
|
"#"+lang.minecraftOffical(),
|
||||||
"http://s3.amazonaws.com/MinecraftCloaks/*.png",
|
|
||||||
"http://skins.minecraft.net/MinecraftCloaks/*.png",
|
"http://skins.minecraft.net/MinecraftCloaks/*.png",
|
||||||
|
"http://s3.amazonaws.com/MinecraftCloaks/*.png",
|
||||||
"#Optifine",
|
"#Optifine",
|
||||||
"http://s.optifine.net/capes/*.png",
|
"http://s.optifine.net/capes/*.png",
|
||||||
"#MineCrack",
|
"#MineCrack",
|
||||||
@@ -81,8 +81,7 @@ public class SkinFrame {
|
|||||||
Dimension screenSize = kit.getScreenSize();
|
Dimension screenSize = kit.getScreenSize();
|
||||||
int screenWidth = screenSize.width;
|
int screenWidth = screenSize.width;
|
||||||
int screenHeight = screenSize.height;
|
int screenHeight = screenSize.height;
|
||||||
jf.setBounds(screenWidth / 2 - windowWidth / 2, screenHeight / 2 - windowHeight / 2,
|
jf.setBounds(screenWidth / 2 - windowWidth / 2, screenHeight / 2 - windowHeight / 2, windowWidth , windowHeight);
|
||||||
windowWidth , windowHeight);
|
|
||||||
|
|
||||||
JLabel title=new JLabel();
|
JLabel title=new JLabel();
|
||||||
title.setForeground(MainFrame.bg5);
|
title.setForeground(MainFrame.bg5);
|
||||||
@@ -118,7 +117,7 @@ public class SkinFrame {
|
|||||||
else
|
else
|
||||||
defaultBtn.setFont(MainFrame.defaultSmallFont);
|
defaultBtn.setFont(MainFrame.defaultSmallFont);
|
||||||
con.add(defaultBtn);
|
con.add(defaultBtn);
|
||||||
defaultBtn.addActionListener(new ActionListener(){ //单击事件
|
defaultBtn.addActionListener(new ActionListener(){
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed (ActionEvent e){
|
public void actionPerformed (ActionEvent e){
|
||||||
String temp="";
|
String temp="";
|
||||||
@@ -137,7 +136,7 @@ public class SkinFrame {
|
|||||||
else
|
else
|
||||||
urlBtn.setFont(MainFrame.defaultSmallFont);
|
urlBtn.setFont(MainFrame.defaultSmallFont);
|
||||||
con.add(urlBtn);
|
con.add(urlBtn);
|
||||||
urlBtn.addActionListener(new ActionListener(){ //单击事件
|
urlBtn.addActionListener(new ActionListener(){
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed (ActionEvent e){
|
public void actionPerformed (ActionEvent e){
|
||||||
String temp=skinList.getText()+"\r\n";
|
String temp=skinList.getText()+"\r\n";
|
||||||
@@ -161,7 +160,7 @@ public class SkinFrame {
|
|||||||
else
|
else
|
||||||
saveBtn.setFont(MainFrame.defaultSmallFont);
|
saveBtn.setFont(MainFrame.defaultSmallFont);
|
||||||
con.add(saveBtn);
|
con.add(saveBtn);
|
||||||
saveBtn.addActionListener(new ActionListener(){ //单击事件
|
saveBtn.addActionListener(new ActionListener(){
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed (ActionEvent e){
|
public void actionPerformed (ActionEvent e){
|
||||||
save(skinList.getText());
|
save(skinList.getText());
|
||||||
@@ -179,7 +178,7 @@ public class SkinFrame {
|
|||||||
else
|
else
|
||||||
closeBtn.setFont(MainFrame.defaultSmallFont);
|
closeBtn.setFont(MainFrame.defaultSmallFont);
|
||||||
con.add(closeBtn);
|
con.add(closeBtn);
|
||||||
closeBtn.addActionListener(new ActionListener(){ //单击事件
|
closeBtn.addActionListener(new ActionListener(){
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed (ActionEvent e){
|
public void actionPerformed (ActionEvent e){
|
||||||
jf.setVisible(false);
|
jf.setVisible(false);
|
||||||
|
|||||||
Reference in new issue
Block a user