diff --git a/sigIRCv2.jar b/sigIRCv2.jar index 28cd81a..7749d00 100644 Binary files a/sigIRCv2.jar and b/sigIRCv2.jar differ diff --git a/src/sig/modules/TouhouMother/UpdateButton.java b/src/sig/modules/TouhouMother/UpdateButton.java index 509b3e2..3f65dc9 100644 --- a/src/sig/modules/TouhouMother/UpdateButton.java +++ b/src/sig/modules/TouhouMother/UpdateButton.java @@ -11,6 +11,7 @@ import java.util.Arrays; import javax.imageio.ImageIO; +import sig.MyPanel; import sig.sigIRC; import sig.modules.TouhouMotherModule; import sig.utils.DrawUtils; @@ -21,6 +22,8 @@ public class UpdateButton extends TouhouMotherButton{ String[] data; int currentselection=4; boolean buttonEnabled = false; + int displaytime=0; + String message = ""; public UpdateButton(TouhouMotherModule parentmodule, File filename, int x, int y) { super(parentmodule,filename,x,y); @@ -30,10 +33,19 @@ public class UpdateButton extends TouhouMotherButton{ } } + public void run() { + if (displaytime>0) { + displaytime--; + } + } + public void draw(Graphics g) { if (buttonEnabled) { DrawUtils.drawOutlineText(g, sigIRC.panel.smallFont, x-TextUtils.calculateStringBoundsFont(data[currentselection].split(",")[0], sigIRC.panel.smallFont).getWidth(), (int)module.getBounds().getY()+(int)module.getBounds().getHeight()-8, 1, Color.WHITE, new Color(30,0,86,255), data[currentselection].split(",")[0]); + if (displaytime>0) { + DrawUtils.drawOutlineText(g, MyPanel.smallFont, x-module.getBounds().getWidth()+buttonimg.getWidth()*2, y+buttonimg.getHeight(), 2, Color.WHITE, new Color(60,0,150), message); + } super.draw(g); } } @@ -71,6 +83,9 @@ public class UpdateButton extends TouhouMotherButton{ int nextselection = currentselection+(int)Math.signum(ev.getWheelRotation()); nextselection = LoopSelectionAround(nextselection); currentselection=nextselection; + if (ev.getWheelRotation()!=0) { + TriggerNewMessage(data[currentselection].split(",")[0],30*3); + } } } @@ -84,6 +99,11 @@ public class UpdateButton extends TouhouMotherButton{ return nextselection; } + private void TriggerNewMessage(String string, int time) { + message = string; + displaytime = time; + } + private int findLastNonBlankLine() { for (int i=data.length-2;i>=0;i++) { if (data[i].length()>0) { diff --git a/src/sig/modules/TouhouMotherModule.java b/src/sig/modules/TouhouMotherModule.java index dcfd167..966425e 100644 --- a/src/sig/modules/TouhouMotherModule.java +++ b/src/sig/modules/TouhouMotherModule.java @@ -105,6 +105,8 @@ public class TouhouMotherModule extends Module implements ActionListener{ data_display_toggle=0; } swapButton.run(); + updateButton.run(); + killButton.run(); } @@ -255,7 +257,7 @@ public class TouhouMotherModule extends Module implements ActionListener{ return tmbd; } } - System.out.println("Invalid boss ID specified! Could not find boss with ID "+bossID+"!"); + //System.out.println("Invalid boss ID specified! Could not find boss with ID "+bossID+"!"); return null; } @@ -264,7 +266,7 @@ public class TouhouMotherModule extends Module implements ActionListener{ if (GetBossData(bossID.getValidInteger())!=null) { bossHP = new SemiValidInteger(Arrays.copyOfRange(memory, 0, 8),GetBossData(bossID.getValidInteger()).getHP(),currentBoss!=null,(bossHP!=null)?bossHP.getTrustedSlot():-1); gameData = new SemiValidString(Arrays.copyOfRange(memory, 9, 13)); - System.out.println(bossHP.toString()+";"+bossID.toString()+";"+gameData.toString()); + //System.out.println(bossHP.toString()+";"+bossID.toString()+";"+gameData.toString()); real_bossHP = bossHP.getValidInteger(); real_bossID = bossID.getValidInteger(); real_gameData = gameData.getValidString(); diff --git a/src/sig/modules/utils/SemiValidInteger.java b/src/sig/modules/utils/SemiValidInteger.java index 6445c40..b5240e9 100644 --- a/src/sig/modules/utils/SemiValidInteger.java +++ b/src/sig/modules/utils/SemiValidInteger.java @@ -41,7 +41,7 @@ public class SemiValidInteger { } } } - System.out.print("Test values: "+Arrays.toString(vals)); + //System.out.print("Test values: "+Arrays.toString(vals)); } public int getValidInteger() { @@ -63,7 +63,7 @@ public class SemiValidInteger { } } } - System.out.println("WARNING! Could not find valid value for SemiValidInteger["+values.length+"]!"); + //System.out.println("WARNING! Could not find valid value for SemiValidInteger["+values.length+"]!"); return ERROR_VALUE; } diff --git a/src/sig/modules/utils/SemiValidString.java b/src/sig/modules/utils/SemiValidString.java index 09ac4f8..0e52e92 100644 --- a/src/sig/modules/utils/SemiValidString.java +++ b/src/sig/modules/utils/SemiValidString.java @@ -18,7 +18,7 @@ public class SemiValidString { return val; } } - System.out.println("WARNING! Could not find valid value for SemiValidString["+values.length+"]!"); + //System.out.println("WARNING! Could not find valid value for SemiValidString["+values.length+"]!"); return ERROR_VALUE; }