mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 08:39:12 +00:00
Added Parabot icon for mac users
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package org.parabot.core.ui;
|
package org.parabot.core.ui;
|
||||||
|
|
||||||
|
import com.apple.eawt.Application;
|
||||||
import org.parabot.core.Context;
|
import org.parabot.core.Context;
|
||||||
import org.parabot.core.ui.components.GamePanel;
|
import org.parabot.core.ui.components.GamePanel;
|
||||||
import org.parabot.core.ui.images.Images;
|
import org.parabot.core.ui.images.Images;
|
||||||
@@ -46,6 +47,7 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
|||||||
this.setLayout(new BorderLayout());
|
this.setLayout(new BorderLayout());
|
||||||
this.addComponentListener(this);
|
this.addComponentListener(this);
|
||||||
this.addWindowListener(this);
|
this.addWindowListener(this);
|
||||||
|
Application.getApplication().setDockIconImage(Images.getResource("/org/parabot/core/ui/images/icon.png"));
|
||||||
|
|
||||||
JMenuBar menuBar = new JMenuBar();
|
JMenuBar menuBar = new JMenuBar();
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,20 @@
|
|||||||
package org.parabot.core.ui;
|
package org.parabot.core.ui;
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
import com.apple.eawt.Application;
|
||||||
import java.awt.Desktop;
|
import org.parabot.core.Core;
|
||||||
import java.awt.Graphics;
|
import org.parabot.core.forum.AccountManager;
|
||||||
import java.awt.Graphics2D;
|
import org.parabot.core.forum.AccountManagerAccess;
|
||||||
import java.awt.RenderingHints;
|
import org.parabot.core.ui.images.Images;
|
||||||
|
import org.parabot.core.ui.utils.SwingUtil;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.KeyAdapter;
|
import java.awt.event.KeyAdapter;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import javax.swing.JButton;
|
|
||||||
import javax.swing.JFrame;
|
|
||||||
import javax.swing.JOptionPane;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JPasswordField;
|
|
||||||
import javax.swing.JTextField;
|
|
||||||
|
|
||||||
import org.parabot.core.Core;
|
|
||||||
import org.parabot.core.forum.AccountManager;
|
|
||||||
import org.parabot.core.forum.AccountManagerAccess;
|
|
||||||
import org.parabot.core.ui.images.Images;
|
|
||||||
import org.parabot.core.ui.utils.SwingUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -90,6 +82,7 @@ public class LoginUI extends JFrame {
|
|||||||
this.setResizable(false);
|
this.setResizable(false);
|
||||||
this.setIconImage(Images
|
this.setIconImage(Images
|
||||||
.getResource("/org/parabot/core/ui/images/icon.png"));
|
.getResource("/org/parabot/core/ui/images/icon.png"));
|
||||||
|
Application.getApplication().setDockIconImage(Images.getResource("/org/parabot/core/ui/images/icon.png"));
|
||||||
|
|
||||||
int w = 250;
|
int w = 250;
|
||||||
int x = 8;
|
int x = 8;
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
package org.parabot.core.ui;
|
package org.parabot.core.ui;
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
import com.apple.eawt.Application;
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.Queue;
|
|
||||||
|
|
||||||
import javax.swing.JFrame;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JScrollPane;
|
|
||||||
|
|
||||||
import org.parabot.core.desc.ServerDescription;
|
import org.parabot.core.desc.ServerDescription;
|
||||||
import org.parabot.core.parsers.servers.ServerParser;
|
import org.parabot.core.parsers.servers.ServerParser;
|
||||||
import org.parabot.core.ui.images.Images;
|
import org.parabot.core.ui.images.Images;
|
||||||
@@ -16,6 +8,11 @@ import org.parabot.core.ui.utils.SwingUtil;
|
|||||||
import org.parabot.core.ui.widgets.ServerWidget;
|
import org.parabot.core.ui.widgets.ServerWidget;
|
||||||
import org.parabot.environment.Environment;
|
import org.parabot.environment.Environment;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.Queue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Shows a list of every supported server which can be started
|
* Shows a list of every supported server which can be started
|
||||||
@@ -52,6 +49,7 @@ public class ServerSelector extends JFrame {
|
|||||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
this.setResizable(false);
|
this.setResizable(false);
|
||||||
this.setIconImage(Images.getResource("/org/parabot/core/ui/images/icon.png"));
|
this.setIconImage(Images.getResource("/org/parabot/core/ui/images/icon.png"));
|
||||||
|
Application.getApplication().setDockIconImage(Images.getResource("/org/parabot/core/ui/images/icon.png"));
|
||||||
|
|
||||||
this.panel = new JPanel(new BorderLayout());
|
this.panel = new JPanel(new BorderLayout());
|
||||||
this.panel.setPreferredSize(new Dimension(600, 400));
|
this.panel.setPreferredSize(new Dimension(600, 400));
|
||||||
|
|||||||
Reference in New Issue
Block a user