Add in files to local resource folder. Start setting up user friendly
interfaces.
This commit is contained in:
parent
13cd308813
commit
2cee57d9e9
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="lib"/>
|
||||
<classpathentry excluding="resources/" kind="src" path="lib"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="lib" path="lib/commons-io-2.5.jar"/>
|
||||
<classpathentry kind="lib" path="lib/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/>
|
||||
|
BIN
lib/resource/CP_Font.ttf
Normal file
BIN
lib/resource/CP_Font.ttf
Normal file
Binary file not shown.
BIN
lib/resource/sigIRCicon.png
Normal file
BIN
lib/resource/sigIRCicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.0 KiB |
1
lib/resource/text/introText.html
Normal file
1
lib/resource/text/introText.html
Normal file
@ -0,0 +1 @@
|
||||
<h1>Hello World!</h1>
|
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -42,7 +42,7 @@ public class TextRow {
|
||||
}
|
||||
|
||||
private int DetermineScrollSpd() {
|
||||
return maxX/Math.max(600,sigIRC.windowWidth)+(sigIRC.chatScrollSpd*2);
|
||||
return maxX/Math.max(600,sigIRC.windowWidth)+(sigIRC.chatScrollSpd);
|
||||
}
|
||||
|
||||
public static TextRow PickRandomTextRow(String username) {
|
||||
|
@ -36,6 +36,7 @@ import sig.utils.FileUtils;
|
||||
import sig.utils.GithubUtils;
|
||||
import sig.utils.MemoryUtils;
|
||||
import sig.utils.TextUtils;
|
||||
import sig.windows.IntroDialog;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
@ -67,6 +68,8 @@ import javax.imageio.ImageIO;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
public class sigIRC{
|
||||
final public static String VERSION = "1.0";
|
||||
|
||||
public static MyPanel panel = null;
|
||||
public static ColorPanel colorpanel = null;
|
||||
public static List<ScrollingText> textobj = new ArrayList<ScrollingText>();
|
||||
@ -242,6 +245,10 @@ public class sigIRC{
|
||||
manager.setClientId("o4c2x0l3e82scgar4hpxg6m5dfjbem");
|
||||
//System.out.println(manager.auth().hasAccessToken());
|
||||
|
||||
new IntroDialog();
|
||||
|
||||
/*
|
||||
|
||||
DownloadAllRequiredDependencies();
|
||||
|
||||
String[] filedata = FileUtils.readFromFile(BASEDIR+"sigIRC/oauthToken.txt");
|
||||
@ -266,7 +273,7 @@ public class sigIRC{
|
||||
downloadsComplete=true;
|
||||
}
|
||||
});
|
||||
InitializeIRCConnection(server, nickname, channel, oauth);
|
||||
InitializeIRCConnection(server, nickname, channel, oauth);*/
|
||||
}
|
||||
|
||||
private static void Initialize() {
|
||||
|
62
src/sig/windows/IntroDialog.java
Normal file
62
src/sig/windows/IntroDialog.java
Normal file
@ -0,0 +1,62 @@
|
||||
package sig.windows;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.FontFormatException;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
||||
import sig.sigIRC;
|
||||
|
||||
public class IntroDialog extends JFrame{
|
||||
Font systemFont;
|
||||
|
||||
public IntroDialog() {
|
||||
this.setLocationByPlatform(true);
|
||||
this.setVisible(true);
|
||||
this.setTitle("sigIRCv2 v"+sigIRC.VERSION);
|
||||
|
||||
InputStream stream = sigIRC.class.getResourceAsStream("/resource/CP_Font.ttf");
|
||||
//File font = new File(sigIRC.BASEDIR+"sigIRC/CP_Font.ttf");
|
||||
|
||||
try {
|
||||
systemFont = Font.createFont(Font.TRUETYPE_FONT,stream);
|
||||
GraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(systemFont);
|
||||
systemFont = new Font("CP Font",0,16);
|
||||
} catch (FontFormatException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
JPanel dialogPanel = new JPanel();
|
||||
//dialogPanel.setSize(this.getSize());
|
||||
dialogPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.BLACK, 2, true),"Welcome to sigIRC!",TitledBorder.DEFAULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION,systemFont));
|
||||
|
||||
this.add(dialogPanel);
|
||||
|
||||
try {
|
||||
this.setIconImage(ImageIO.read(sigIRC.class.getResource("/resource/sigIRCicon.png")));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
JEditorPane introText = new JEditorPane();
|
||||
try {
|
||||
introText.setPage(sigIRC.class.getResource("/resource/text/introText.html"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
dialogPanel.add(introText);
|
||||
|
||||
this.setSize(720, 480);
|
||||
}
|
||||
}
|
6
src/sig/windows/ProgramText.java
Normal file
6
src/sig/windows/ProgramText.java
Normal file
@ -0,0 +1,6 @@
|
||||
package sig.windows;
|
||||
|
||||
public class ProgramText {
|
||||
public static String intro_text = "Welcome to sigIRCv2!"
|
||||
+ "";
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user