Bugfix when monitor adjustments or switching occurs, nulling out the
mouse cursor.
This commit is contained in:
parent
71e9a6872c
commit
fad14b1843
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -75,10 +75,14 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
|||||||
super.paintComponent(g);
|
super.paintComponent(g);
|
||||||
// Draw Text
|
// Draw Text
|
||||||
//int counter=18;
|
//int counter=18;
|
||||||
if (sigIRC.panel!=null) {
|
try {
|
||||||
lastMouseX = (int)(MouseInfo.getPointerInfo().getLocation().getX()-sigIRC.panel.getLocationOnScreen().getX());
|
if (sigIRC.panel!=null && MouseInfo.getPointerInfo()!=null) {
|
||||||
lastMouseY = (int)(MouseInfo.getPointerInfo().getLocation().getY()-sigIRC.panel.getLocationOnScreen().getY());
|
lastMouseX = (int)(MouseInfo.getPointerInfo().getLocation().getX()-sigIRC.panel.getLocationOnScreen().getX());
|
||||||
//System.out.println("("+lastMouseX+","+lastMouseY+")");
|
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) {
|
/*if (sigIRC.window!=null && sigIRC.window.getMousePosition(true)!=null && sigIRC.overlayMode) {
|
||||||
lastMouseX = (int)sigIRC.window.getMousePosition(true).getX();
|
lastMouseX = (int)sigIRC.window.getMousePosition(true).getX();
|
||||||
|
@ -63,6 +63,7 @@ public class TwitchModule extends Module{
|
|||||||
public static BufferedImage DOWNARROWIMAGE;
|
public static BufferedImage DOWNARROWIMAGE;
|
||||||
public static BufferedImage UPTIMEIMAGE;
|
public static BufferedImage UPTIMEIMAGE;
|
||||||
public static long myTwitchChannelID = 0;
|
public static long myTwitchChannelID = 0;
|
||||||
|
public int previous_xoffset = 0;
|
||||||
|
|
||||||
public TwitchModule(Rectangle2D bounds, String moduleName) {
|
public TwitchModule(Rectangle2D bounds, String moduleName) {
|
||||||
this(bounds,moduleName,true);
|
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()},
|
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},
|
new int[]{yoffset-4,yoffset-4,yoffset+16,yoffset+16},
|
||||||
4);
|
4);
|
||||||
|
previous_xoffset = xoffset;
|
||||||
if (currentlyPlaying!=null && currentlyPlaying.length()>0) {
|
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;
|
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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user