diff --git a/sigIRCv2.jar b/sigIRCv2.jar index 054d81c..8e83eb9 100644 Binary files a/sigIRCv2.jar and b/sigIRCv2.jar differ diff --git a/src/sig/MyPanel.java b/src/sig/MyPanel.java index d4cb327..0e78623 100644 --- a/src/sig/MyPanel.java +++ b/src/sig/MyPanel.java @@ -75,10 +75,14 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo super.paintComponent(g); // Draw Text //int counter=18; - if (sigIRC.panel!=null) { - lastMouseX = (int)(MouseInfo.getPointerInfo().getLocation().getX()-sigIRC.panel.getLocationOnScreen().getX()); - lastMouseY = (int)(MouseInfo.getPointerInfo().getLocation().getY()-sigIRC.panel.getLocationOnScreen().getY()); - //System.out.println("("+lastMouseX+","+lastMouseY+")"); + try { + if (sigIRC.panel!=null && MouseInfo.getPointerInfo()!=null) { + lastMouseX = (int)(MouseInfo.getPointerInfo().getLocation().getX()-sigIRC.panel.getLocationOnScreen().getX()); + lastMouseY = (int)(MouseInfo.getPointerInfo().getLocation().getY()-sigIRC.panel.getLocationOnScreen().getY()); + //System.out.println("("+lastMouseX+","+lastMouseY+")"); + } + } catch (NullPointerException e) { + //Do Nothing I guess. } /*if (sigIRC.window!=null && sigIRC.window.getMousePosition(true)!=null && sigIRC.overlayMode) { lastMouseX = (int)sigIRC.window.getMousePosition(true).getX(); diff --git a/src/sig/modules/TwitchModule.java b/src/sig/modules/TwitchModule.java index 3312c44..0fe3778 100644 --- a/src/sig/modules/TwitchModule.java +++ b/src/sig/modules/TwitchModule.java @@ -63,6 +63,7 @@ public class TwitchModule extends Module{ public static BufferedImage DOWNARROWIMAGE; public static BufferedImage UPTIMEIMAGE; public static long myTwitchChannelID = 0; + public int previous_xoffset = 0; public TwitchModule(Rectangle2D bounds, String moduleName) { this(bounds,moduleName,true); @@ -442,6 +443,7 @@ public class TwitchModule extends Module{ g.fillPolygon(new int[]{(int)position.getX(),(int)(position.getX()+position.getWidth()),(int)(position.getX()+position.getWidth()),(int)position.getX()}, new int[]{yoffset-4,yoffset-4,yoffset+16,yoffset+16}, 4); + previous_xoffset = xoffset; if (currentlyPlaying!=null && currentlyPlaying.length()>0) { DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, xoffset, yoffset+TextUtils.calculateStringBoundsFont(currentlyPlaying, sigIRC.panel.userFont).getHeight()/2+3, 2, g.getColor(), new Color(195,195,195), currentlyPlaying);xoffset+=TextUtils.calculateStringBoundsFont(currentlyPlaying, sigIRC.panel.userFont).getWidth()+16; }