diff --git a/.classpath b/.classpath index e58c6d0..97f7436 100644 --- a/.classpath +++ b/.classpath @@ -15,5 +15,26 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/basicplayer3.0.jar b/lib/basicplayer3.0.jar new file mode 100644 index 0000000..a45e1fc Binary files /dev/null and b/lib/basicplayer3.0.jar differ diff --git a/lib/commons-logging-api.jar b/lib/commons-logging-api.jar new file mode 100644 index 0000000..ade9a13 Binary files /dev/null and b/lib/commons-logging-api.jar differ diff --git a/lib/jl1.0.jar b/lib/jl1.0.jar new file mode 100644 index 0000000..17f7c0a Binary files /dev/null and b/lib/jl1.0.jar differ diff --git a/lib/jogg-0.0.7.jar b/lib/jogg-0.0.7.jar new file mode 100644 index 0000000..1cbd1ad Binary files /dev/null and b/lib/jogg-0.0.7.jar differ diff --git a/lib/jorbis-0.0.15.jar b/lib/jorbis-0.0.15.jar new file mode 100644 index 0000000..4cf51f9 Binary files /dev/null and b/lib/jorbis-0.0.15.jar differ diff --git a/lib/jspeex0.9.7.jar b/lib/jspeex0.9.7.jar new file mode 100644 index 0000000..f7a1861 Binary files /dev/null and b/lib/jspeex0.9.7.jar differ diff --git a/lib/mp3spi1.9.4.jar b/lib/mp3spi1.9.4.jar new file mode 100644 index 0000000..019b86c Binary files /dev/null and b/lib/mp3spi1.9.4.jar differ diff --git a/lib/tritonus_share.jar b/lib/tritonus_share.jar new file mode 100644 index 0000000..d21ba89 Binary files /dev/null and b/lib/tritonus_share.jar differ diff --git a/lib/vorbisspi1.0.2.jar b/lib/vorbisspi1.0.2.jar new file mode 100644 index 0000000..1a924af Binary files /dev/null and b/lib/vorbisspi1.0.2.jar differ diff --git a/sigIRCv2.jar b/sigIRCv2.jar index 1925884..035f10a 100644 Binary files a/sigIRCv2.jar and b/sigIRCv2.jar differ diff --git a/src/sig/Module.java b/src/sig/Module.java index 2f8fa71..3c5718f 100644 --- a/src/sig/Module.java +++ b/src/sig/Module.java @@ -1,6 +1,7 @@ package sig; import java.awt.Color; import java.awt.Cursor; +import java.awt.Dimension; import java.awt.Graphics; import java.awt.Point; import java.awt.Rectangle; @@ -55,7 +56,12 @@ public class Module extends JFrame implements ComponentListener, WindowListener, int windowUpdateCounter = 30; public Module(Rectangle bounds, String moduleName) { - + + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } this.addComponentListener(this); this.addWindowListener(this); this.addKeyListener(this); @@ -76,8 +82,8 @@ public class Module extends JFrame implements ComponentListener, WindowListener, this.titleHeight = (int)TextUtils.calculateStringBoundsFont(this.name, sigIRC.userFont).getHeight(); - this.setSize((int)position.getWidth(), (int)position.getHeight()); - panel.setSize(this.getSize()); + this.setMinimumSize(new Dimension((int)position.getWidth(), (int)position.getHeight())); + panel.setMinimumSize(this.getMinimumSize()); this.add(panel); //this.pack(); diff --git a/src/sig/modules/ChatLog/ChatLogMessage.java b/src/sig/modules/ChatLog/ChatLogMessage.java index e90b7d4..52e112d 100644 --- a/src/sig/modules/ChatLog/ChatLogMessage.java +++ b/src/sig/modules/ChatLog/ChatLogMessage.java @@ -4,6 +4,7 @@ import java.awt.Color; import java.awt.Graphics; import java.awt.Point; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Random; @@ -34,25 +35,32 @@ public class ChatLogMessage { this.refModule = ChatLogModule.chatlogmodule; this.rawMessage = rawMessage; this.position = new Point(0,(int)refModule.getPosition().getHeight()-MESSAGE_SPACING); + //System.out.println("1"); WrapText(); + //System.out.println("2"); for (ChatLogMessage clm : this.refModule.messageHistory) { clm.position.setLocation( clm.position.getX(), clm.position.getY()-messageDisplaySize.getY()); //System.out.println(clm.rawMessage+": "+clm.position); } + //System.out.println("3"); this.position.setLocation(this.position.getX(), this.position.getY()-messageDisplaySize.getY()+ChatLogModule.chatlogmodule.scrolllog_yoffset); //System.out.println(displayMessage); this.username = DetectUsername(displayMessage); + //System.out.println("4"); if (this.username!=null) { displayMessage.set(0,GetMessage(displayMessage.get(0)+" ")); usernameWidth = (int)TextUtils.calculateStringBoundsFont(this.username, sigIRC.userFont).getWidth(); } for (int i=0;i=ChatLogModule.messageHistoryCount) { + //System.out.println(" Removed."); ChatLogModule.chatlogmodule.messageHistory.remove(0).cleanup(); } - ChatLogModule.chatlogmodule.messageHistory.add(new ChatLogMessage(s)); + //System.out.println(" Adding "+s+"."); + ChatLogModule.chatlogmodule.messageQueue.add(s); } } } diff --git a/src/sig/modules/ChatLogModule.java b/src/sig/modules/ChatLogModule.java index 37510e5..760ffde 100644 --- a/src/sig/modules/ChatLogModule.java +++ b/src/sig/modules/ChatLogModule.java @@ -24,7 +24,7 @@ import sig.utils.DrawUtils; import sig.utils.FileUtils; public class ChatLogModule extends Module{ - public static int messageHistoryCount = 50; + public static int messageHistoryCount = 20; public List messageHistory = new ArrayList(); int delay = 150; boolean initialized=false; @@ -34,6 +34,7 @@ public class ChatLogModule extends Module{ long positionsNeedUpdating = 0; //Set it to System.currentTimeMillis() to request a configuration save. Rectangle prevpos = (Rectangle)position.clone(); int justOpened=2; + public List messageQueue = new ArrayList(); public ChatLogModule(Rectangle bounds, String moduleName) { @@ -59,6 +60,10 @@ public class ChatLogModule extends Module{ public void run() { super.run(); + for (int i=0;i0 && sigIRC.subEmotesCompleted) { delay--; } else diff --git a/src/sig/modules/ScrollingChatModule.java b/src/sig/modules/ScrollingChatModule.java index 76d7501..f72a80a 100644 --- a/src/sig/modules/ScrollingChatModule.java +++ b/src/sig/modules/ScrollingChatModule.java @@ -28,20 +28,18 @@ public class ScrollingChatModule extends Module{ ScrollingChatModule.module = this; String[] filedata = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/oauthToken.txt"); - - final String oauth = filedata[0].trim().substring(0, Math.min(36,filedata[0].trim().length())); - Thread t = new Thread(()->{ - sigIRC.InitializeIRCConnection(sigIRC.server, sigIRC.nickname, sigIRC.channel, oauth); - }); - - t.start(); - UpdateSubEmoticons(); + for (int i=0;i(","12")); sigIRC.emoticons.add(new Emoticon("<3","13")); - + + + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } //Load is done. Start up the panel. sigIRC.window = new ProgramWindow(); this.setVisible(false); diff --git a/src/sig/windows/ModuleButton.java b/src/sig/windows/ModuleButton.java new file mode 100644 index 0000000..3b934db --- /dev/null +++ b/src/sig/windows/ModuleButton.java @@ -0,0 +1,46 @@ +package sig.windows; + +import java.awt.Color; +import java.awt.Dimension; + +import javax.swing.JToggleButton; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import sig.Module; + +@SuppressWarnings("serial") +class ModuleButton extends JToggleButton{ + String label = ""; + ModuleButton button; + Module myModule; + public ModuleButton(String label, Module module) { + this.label=label; + this.button=this; + this.myModule=module; + this.setBackground(Color.DARK_GRAY); + this.setText(label); + this.setToolTipText("Click to enable and disable the \n"+label+" module."); + this.setPreferredSize(new Dimension(160,56)); + this.setForeground(Color.GRAY); + this.setIconTextGap(4); + this.setSelectedIcon(ProgramWindow.selected_icon); + this.setIcon(ProgramWindow.deselected_icon); + this.setSelected(true); + button.setForeground(Color.BLUE); + this.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + if (button.isSelected()) { + button.setForeground(Color.BLUE); + } + else { + button.setBackground(Color.DARK_GRAY); + button.setForeground(Color.GRAY); + } + myModule.setVisible(button.isSelected()); + } + + }); + } +} \ No newline at end of file diff --git a/src/sig/windows/ProgramWindow.java b/src/sig/windows/ProgramWindow.java index 46c29a6..3b69d94 100644 --- a/src/sig/windows/ProgramWindow.java +++ b/src/sig/windows/ProgramWindow.java @@ -1,7 +1,6 @@ package sig.windows; import java.awt.Color; -import java.awt.Dimension; import java.awt.GridLayout; import java.awt.Image; import java.awt.Rectangle; @@ -10,6 +9,7 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; @@ -21,10 +21,12 @@ import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; -import javax.swing.JToggleButton; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; +import javazoom.jlgui.basicplayer.BasicController; +import javazoom.jlgui.basicplayer.BasicPlayer; +import javazoom.jlgui.basicplayer.BasicPlayerEvent; +import javazoom.jlgui.basicplayer.BasicPlayerException; +import javazoom.jlgui.basicplayer.BasicPlayerListener; import sig.BackgroundColorButton; import sig.ColorPanel; import sig.Module; @@ -117,6 +119,15 @@ public class ProgramWindow extends JFrame{ } GridLayout myLayout = new GridLayout(0,1); sigIRC.panel.setLayout(myLayout); + + ///Play MUSIC + /*BasicPlayer player = new BasicPlayer(); + try { + player.open(new File("D:\\Videos\\4K Video Downloader\\3R2 - The Truth Never Spoken (Energetic Trance Mix).mp3")); + player.play(); + } catch (BasicPlayerException e) { + e.printStackTrace(); + }*/ //colorpanel = new ColorPanel(); //this.add(colorpanel); @@ -139,40 +150,4 @@ public class ProgramWindow extends JFrame{ //Module testMod = new Module(new Rectangle(0,0,640,480),"Test"); } -} - -@SuppressWarnings("serial") -class ModuleButton extends JToggleButton{ - String label = ""; - ModuleButton button; - Module myModule; - public ModuleButton(String label, Module module) { - this.label=label; - this.button=this; - this.myModule=module; - this.setBackground(Color.DARK_GRAY); - this.setText(label); - this.setToolTipText("Click to enable and disable the \n"+label+" module."); - this.setPreferredSize(new Dimension(160,56)); - this.setForeground(Color.GRAY); - this.setIconTextGap(4); - this.setSelectedIcon(ProgramWindow.selected_icon); - this.setIcon(ProgramWindow.deselected_icon); - this.setSelected(true); - button.setForeground(Color.BLUE); - this.addChangeListener(new ChangeListener() { - @Override - public void stateChanged(ChangeEvent e) { - if (button.isSelected()) { - button.setForeground(Color.BLUE); - } - else { - button.setBackground(Color.DARK_GRAY); - button.setForeground(Color.GRAY); - } - myModule.setVisible(button.isSelected()); - } - - }); - } } \ No newline at end of file