mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 08:39:09 +00:00
Updated version and added maven support for the build-in client version
This commit is contained in:
@@ -21,5 +21,5 @@ public class Configuration {
|
||||
public static final String DATA_API = "http://bdn.parabot.org/api/v2/data/";
|
||||
public static final String ITEM_API = DATA_API + "items/";
|
||||
|
||||
public static final String BOT_VERSION = "2.2.33";
|
||||
public static final String BOT_VERSION = (String) ProjectProperties.getProjectVersion();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.util.Properties;
|
||||
|
||||
/**
|
||||
* @author JKetelaar
|
||||
* @deprecated
|
||||
*/
|
||||
public class ProjectProperties {
|
||||
|
||||
@@ -20,13 +19,12 @@ public class ProjectProperties {
|
||||
private void setProperties(){
|
||||
InputStream input;
|
||||
try {
|
||||
String propertiesFileName = "/app.properties";
|
||||
String propertiesFileName = "storage/app.properties";
|
||||
|
||||
Properties properties = new Properties();
|
||||
InputStream inputStream = ProjectProperties.class.getClassLoader()
|
||||
input = getClass().getClassLoader()
|
||||
.getResourceAsStream(propertiesFileName);
|
||||
|
||||
cached.load(inputStream);
|
||||
cached.load(input);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -84,15 +84,15 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
JMenuItem exit = new JMenuItem("Exit");
|
||||
|
||||
run = new JMenuItem("Run");
|
||||
run.setIcon(new ImageIcon(Images.getResource("/images/run.png")));
|
||||
run.setIcon(new ImageIcon(Images.getResource("/storage/images/run.png")));
|
||||
|
||||
pause = new JMenuItem("Pause");
|
||||
pause.setEnabled(false);
|
||||
pause.setIcon(new ImageIcon(Images.getResource("/images/pause.png")));
|
||||
pause.setIcon(new ImageIcon(Images.getResource("/storage/images/pause.png")));
|
||||
|
||||
stop = new JMenuItem("Stop");
|
||||
stop.setEnabled(false);
|
||||
stop.setIcon(new ImageIcon(Images.getResource("/images/stop.png")));
|
||||
stop.setIcon(new ImageIcon(Images.getResource("/storage/images/stop.png")));
|
||||
|
||||
screenshot.addActionListener(this);
|
||||
proxy.addActionListener(this);
|
||||
|
||||
@@ -95,7 +95,7 @@ public class LoginUI extends JFrame {
|
||||
RenderingHints.KEY_INTERPOLATION,
|
||||
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
|
||||
g.drawImage(Images
|
||||
.getResource("/images/para.png"),
|
||||
.getResource("/storage/images/para.png"),
|
||||
0, 8, 250, 45, null);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ public class VerboseLoader extends JPanel implements ProgressListener {
|
||||
throw new IllegalStateException("MainScreenComponent already made.");
|
||||
}
|
||||
current = this;
|
||||
this.background = Images.getResource("/images/background.png");
|
||||
this.background = Images.getResource("/storage/images/background.png");
|
||||
this.progressBar = new ProgressBar(400, 20);
|
||||
setLayout(new GridBagLayout());
|
||||
setSize(775, 510);
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SwingUtil {
|
||||
}
|
||||
|
||||
public static void setParabotIcons(JFrame f) {
|
||||
f.setIconImage(Images.getResource("/images/icon.png"));
|
||||
f.setIconImage(Images.getResource("/storage/images/icon.png"));
|
||||
|
||||
if(OperatingSystem.getOS() == OperatingSystem.MAC) {
|
||||
/** Adds the dock icon to mac users */
|
||||
@@ -37,7 +37,7 @@ public class SwingUtil {
|
||||
Class<?> util = Class.forName("com.apple.eawt.Application");
|
||||
Object application = util.getMethod("getApplication", new Class[] { }).invoke(null);
|
||||
Method setDockIconImage = util.getMethod("setDockIconImage", new Class[] { Image.class });
|
||||
setDockIconImage.invoke(application, Images.getResource("/images/icon.png"));
|
||||
setDockIconImage.invoke(application, Images.getResource("/storage/images/icon.png"));
|
||||
} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException ignored) {
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
|
||||
@@ -33,7 +33,7 @@ public enum Category
|
||||
*/
|
||||
public static BufferedImage getIcon(String s) {
|
||||
if (images.get(s) == null) {
|
||||
images.put(s, Images.getResource("/images/category/" + s + ".png"));
|
||||
images.put(s, Images.getResource("/resources/images/category/" + s + ".png"));
|
||||
}
|
||||
return images.get(s);
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public enum Category
|
||||
private static HashMap<String, BufferedImage> images = new HashMap<>();
|
||||
|
||||
static {
|
||||
images.put("script", Images.getResource("/images/category/script.png"));
|
||||
images.put("script", Images.getResource("/storage/images/category/script.png"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user