diff --git a/.classpath b/.classpath index 0a0f0b6..2c36777 100644 --- a/.classpath +++ b/.classpath @@ -1,7 +1,7 @@ - + diff --git a/lib/resource/CP_Font.ttf b/lib/resource/CP_Font.ttf new file mode 100644 index 0000000..5de09e1 Binary files /dev/null and b/lib/resource/CP_Font.ttf differ diff --git a/lib/resource/sigIRCicon.png b/lib/resource/sigIRCicon.png new file mode 100644 index 0000000..11bcda9 Binary files /dev/null and b/lib/resource/sigIRCicon.png differ diff --git a/lib/resource/text/introText.html b/lib/resource/text/introText.html new file mode 100644 index 0000000..ba7c290 --- /dev/null +++ b/lib/resource/text/introText.html @@ -0,0 +1 @@ +

Hello World!

\ No newline at end of file diff --git a/sigIRCv2.jar b/sigIRCv2.jar index 206d5a5..5f337e6 100644 Binary files a/sigIRCv2.jar and b/sigIRCv2.jar differ diff --git a/src/sig/TextRow.java b/src/sig/TextRow.java index c9897ab..8d192a2 100644 --- a/src/sig/TextRow.java +++ b/src/sig/TextRow.java @@ -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) { diff --git a/src/sig/sigIRC.java b/src/sig/sigIRC.java index e769850..2630179 100644 --- a/src/sig/sigIRC.java +++ b/src/sig/sigIRC.java @@ -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 textobj = new ArrayList(); @@ -241,7 +244,11 @@ public class sigIRC{ lastSubEmoteUpdate = config.getInteger("lastSubEmote_APIUpdate",Calendar.getInstance().get(Calendar.DAY_OF_YEAR)); 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() { diff --git a/src/sig/windows/IntroDialog.java b/src/sig/windows/IntroDialog.java new file mode 100644 index 0000000..53a3468 --- /dev/null +++ b/src/sig/windows/IntroDialog.java @@ -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); + } +} diff --git a/src/sig/windows/ProgramText.java b/src/sig/windows/ProgramText.java new file mode 100644 index 0000000..c63705c --- /dev/null +++ b/src/sig/windows/ProgramText.java @@ -0,0 +1,6 @@ +package sig.windows; + +public class ProgramText { + public static String intro_text = "Welcome to sigIRCv2!" + + ""; +}