Large update for interface upgrade for sigIRC
This commit is contained in:
parent
79bb1e576b
commit
413fab117b
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -67,9 +67,9 @@ public class Module extends JFrame implements ComponentListener, WindowListener,
|
|||||||
this.addKeyListener(this);
|
this.addKeyListener(this);
|
||||||
|
|
||||||
this.position = bounds;
|
this.position = bounds;
|
||||||
|
System.out.println(position);
|
||||||
this.name = moduleName;
|
this.name = moduleName;
|
||||||
this.enabled=true;
|
this.enabled=true;
|
||||||
this.setVisible(true);
|
|
||||||
this.setTitle(moduleName);
|
this.setTitle(moduleName);
|
||||||
panel = new ListenerPanel(this){
|
panel = new ListenerPanel(this){
|
||||||
public void paintComponent(Graphics g) {
|
public void paintComponent(Graphics g) {
|
||||||
@ -80,17 +80,19 @@ public class Module extends JFrame implements ComponentListener, WindowListener,
|
|||||||
this.setLocation((int)position.getX(), (int)position.getY());
|
this.setLocation((int)position.getX(), (int)position.getY());
|
||||||
|
|
||||||
this.titleHeight = (int)TextUtils.calculateStringBoundsFont(this.name, sigIRC.userFont).getHeight();
|
this.titleHeight = (int)TextUtils.calculateStringBoundsFont(this.name, sigIRC.userFont).getHeight();
|
||||||
|
|
||||||
|
this.setSize(new Dimension((int)position.getWidth(), (int)position.getHeight()));
|
||||||
|
|
||||||
|
panel.setSize(this.getSize());
|
||||||
this.setMinimumSize(new Dimension((int)position.getWidth(), (int)position.getHeight()));
|
//System.out.println("Module "+moduleName+": "+position);
|
||||||
panel.setMinimumSize(this.getMinimumSize());
|
|
||||||
|
|
||||||
this.add(panel);
|
this.add(panel);
|
||||||
//this.pack();
|
//this.pack();
|
||||||
|
repaint();
|
||||||
|
this.setVisible(true);
|
||||||
|
|
||||||
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
||||||
scheduler.scheduleWithFixedDelay(()->{
|
scheduler.scheduleWithFixedDelay(()->{
|
||||||
updateFPSCounter();
|
|
||||||
run();
|
run();
|
||||||
panel.repaint();
|
panel.repaint();
|
||||||
},(long)((1d/(sigIRC.framerate+1))*1000),(long)((1d/(sigIRC.framerate+1))*1000),TimeUnit.MILLISECONDS);
|
},(long)((1d/(sigIRC.framerate+1))*1000),(long)((1d/(sigIRC.framerate+1))*1000),TimeUnit.MILLISECONDS);
|
||||||
@ -140,6 +142,7 @@ public class Module extends JFrame implements ComponentListener, WindowListener,
|
|||||||
public void draw(Graphics g) {
|
public void draw(Graphics g) {
|
||||||
//g.fillRect(0, 0, (int)position.getWidth(), (int)position.getHeight());
|
//g.fillRect(0, 0, (int)position.getWidth(), (int)position.getHeight());
|
||||||
//DrawUtils.drawText(g, 0, 16, Color.WHITE, "Test");
|
//DrawUtils.drawText(g, 0, 16, Color.WHITE, "Test");
|
||||||
|
updateFPSCounter();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ModuleDragEvent(int oldX, int oldY, int newX, int newY) {
|
public void ModuleDragEvent(int oldX, int oldY, int newX, int newY) {
|
||||||
@ -194,7 +197,9 @@ public class Module extends JFrame implements ComponentListener, WindowListener,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void componentMoved(ComponentEvent e) {
|
public void componentMoved(ComponentEvent e) {
|
||||||
UpdatePosition(e);
|
if (this.isVisible()) {
|
||||||
|
UpdatePosition(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePosition(ComponentEvent e) {
|
private void UpdatePosition(ComponentEvent e) {
|
||||||
@ -206,7 +211,9 @@ public class Module extends JFrame implements ComponentListener, WindowListener,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void componentResized(ComponentEvent e) {
|
public void componentResized(ComponentEvent e) {
|
||||||
UpdatePosition(e);
|
if (this.isVisible()) {
|
||||||
|
UpdatePosition(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -35,10 +35,7 @@ import sig.modules.ChatLog.ChatLogMessage;
|
|||||||
import sig.utils.FileUtils;
|
import sig.utils.FileUtils;
|
||||||
|
|
||||||
public class MyPanel extends JPanel{
|
public class MyPanel extends JPanel{
|
||||||
public int lastMouseX = 0;
|
public MyPanel() {
|
||||||
public int lastMouseY = 0;
|
|
||||||
|
|
||||||
public MyPanel() {
|
|
||||||
//setBorder(BorderFactory.createLineBorder(Color.black));
|
//setBorder(BorderFactory.createLineBorder(Color.black));
|
||||||
setFocusable(true);
|
setFocusable(true);
|
||||||
}
|
}
|
||||||
@ -51,11 +48,6 @@ public class MyPanel extends JPanel{
|
|||||||
super.paintComponent(g);
|
super.paintComponent(g);
|
||||||
// Draw Text
|
// Draw Text
|
||||||
//int counter=18;
|
//int counter=18;
|
||||||
if (sigIRC.panel!=null) {
|
|
||||||
lastMouseX = (int)(MouseInfo.getPointerInfo().getLocation().getX());
|
|
||||||
lastMouseY = (int)(MouseInfo.getPointerInfo().getLocation().getY());
|
|
||||||
//System.out.println("("+lastMouseX+","+lastMouseY+")");
|
|
||||||
}
|
|
||||||
/*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();
|
||||||
lastMouseY = (int)sigIRC.window.getMousePosition(true).getY();
|
lastMouseY = (int)sigIRC.window.getMousePosition(true).getY();
|
||||||
|
@ -24,7 +24,7 @@ import sig.utils.DrawUtils;
|
|||||||
import sig.utils.FileUtils;
|
import sig.utils.FileUtils;
|
||||||
|
|
||||||
public class ChatLogModule extends Module{
|
public class ChatLogModule extends Module{
|
||||||
public static int messageHistoryCount = 20;
|
public static int messageHistoryCount = 50;
|
||||||
public List<ChatLogMessage> messageHistory = new ArrayList<ChatLogMessage>();
|
public List<ChatLogMessage> messageHistory = new ArrayList<ChatLogMessage>();
|
||||||
int delay = 150;
|
int delay = 150;
|
||||||
boolean initialized=false;
|
boolean initialized=false;
|
||||||
|
@ -37,19 +37,19 @@ public class ClickableButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean mouseInsideBounds(MouseEvent ev) {
|
public boolean mouseInsideBounds(MouseEvent ev) {
|
||||||
return ev.getX()>=module.getPosition().getX()+x && ev.getX()<=module.getPosition().getX()+x+width &&
|
return ev.getX()>=0+x && ev.getX()<=0+x+width &&
|
||||||
ev.getY()>=module.getPosition().getY()+y && ev.getY()<=module.getPosition().getY()+y+height;
|
ev.getY()>=0+y && ev.getY()<=0+y+height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(Graphics g) {
|
public void draw(Graphics g) {
|
||||||
Color color_identity = g.getColor();
|
Color color_identity = g.getColor();
|
||||||
g.setColor(Color.WHITE);
|
g.setColor(Color.WHITE);
|
||||||
g.drawRect((int)module.getPosition().getX()+x,
|
g.drawRect((int)0+x,
|
||||||
(int)module.getPosition().getY()+y, width, height);
|
(int)0+y, width, height);
|
||||||
g.setColor(Color.BLACK);
|
g.setColor(Color.BLACK);
|
||||||
g.fillRect((int)module.getPosition().getX()+x+1,
|
g.fillRect((int)0+x+1,
|
||||||
(int)module.getPosition().getY()+y+1, width-1, height-1);
|
(int)0+y+1, width-1, height-1);
|
||||||
DrawUtils.drawTextFont(g, sigIRC.userFont, module.getPosition().getX()+x-TextUtils.calculateStringBoundsFont(label, sigIRC.userFont).getWidth()/2+width/2, module.getPosition().getY()+y+height-1, Color.WHITE, label);
|
DrawUtils.drawTextFont(g, sigIRC.userFont, 0+x-TextUtils.calculateStringBoundsFont(label, sigIRC.userFont).getWidth()/2+width/2, 0+y+height-1, Color.WHITE, label);
|
||||||
g.setColor(color_identity);
|
g.setColor(color_identity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ public enum MemoryData {
|
|||||||
CHARGE_RING(MemoryOffset.CHARGE_RING,"Charge Ring","charge_ring.png",true),
|
CHARGE_RING(MemoryOffset.CHARGE_RING,"Charge Ring","charge_ring.png",true),
|
||||||
CARROT_SHOOTER(MemoryOffset.CARROT_SHOOTER,"Carrot Shooter","carrot_shooter.png",true),
|
CARROT_SHOOTER(MemoryOffset.CARROT_SHOOTER,"Carrot Shooter","carrot_shooter.png",true),
|
||||||
SUPER_CARROT(MemoryOffset.SUPER_CARROT,"Super Carrot","super_carrot.png",true),
|
SUPER_CARROT(MemoryOffset.SUPER_CARROT,"Super Carrot","super_carrot.png",true),
|
||||||
|
GOLD_CARROT(MemoryOffset.GOLD_CARROT,"Gold Carrot","gold_carrot.png",true),
|
||||||
/*DLC_ITEM1(MemoryOffset.DLC_ITEM1,"","",true),
|
/*DLC_ITEM1(MemoryOffset.DLC_ITEM1,"","",true),
|
||||||
DLC_ITEM2(MemoryOffset.DLC_ITEM2,"","",true),
|
DLC_ITEM2(MemoryOffset.DLC_ITEM2,"","",true),
|
||||||
DLC_ITEM4(MemoryOffset.DLC_ITEM4,"","",true),*/
|
DLC_ITEM4(MemoryOffset.DLC_ITEM4,"","",true),*/
|
||||||
@ -102,4 +103,4 @@ public enum MemoryData {
|
|||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return (key_item)?name:name+" Badge";
|
return (key_item)?name:name+" Badge";
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -49,13 +49,16 @@ public class Profile {
|
|||||||
RabiRaceModule parent;
|
RabiRaceModule parent;
|
||||||
public long lastWebUpdate = System.currentTimeMillis();
|
public long lastWebUpdate = System.currentTimeMillis();
|
||||||
DecimalFormat df = new DecimalFormat("0.0");
|
DecimalFormat df = new DecimalFormat("0.0");
|
||||||
Profile oldProfile;
|
public Profile oldProfile;
|
||||||
public boolean isArchive = false;
|
public boolean isArchive = false;
|
||||||
final static Color TEAL = new Color(0,128,128);
|
final static Color TEAL = new Color(0,128,128);
|
||||||
public Image statUpdateCacheImage;
|
public Image statUpdateCacheImage;
|
||||||
public Image imageDisplayUpdateImage;
|
public Image imageDisplayUpdateImage;
|
||||||
public boolean stat_update_required = true;
|
public boolean stat_update_required = true;
|
||||||
public boolean image_display_update_required = true;
|
public boolean image_display_update_required = true;
|
||||||
|
public int avatarval = 0;
|
||||||
|
public static Image rainbowEggImage;
|
||||||
|
public static Image darkRainbowEggImage;
|
||||||
|
|
||||||
public Profile(RabiRaceModule module) {
|
public Profile(RabiRaceModule module) {
|
||||||
this(module,true);
|
this(module,true);
|
||||||
@ -83,35 +86,71 @@ public class Profile {
|
|||||||
oldProfile.key_items = (LinkedHashMap<MemoryData, Integer>)key_items.clone();
|
oldProfile.key_items = (LinkedHashMap<MemoryData, Integer>)key_items.clone();
|
||||||
oldProfile.badges = (LinkedHashMap<MemoryData, Integer>)badges.clone();
|
oldProfile.badges = (LinkedHashMap<MemoryData, Integer>)badges.clone();
|
||||||
oldProfile.playtime = playtime;
|
oldProfile.playtime = playtime;
|
||||||
|
oldProfile.difficulty = difficulty;
|
||||||
|
oldProfile.loop = loop;
|
||||||
|
oldProfile.itempct = itempct;
|
||||||
|
oldProfile.mappct = mappct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int compareAllChangedStatValues() {
|
||||||
|
int count=0;
|
||||||
|
if (oldProfile.playtime/60!=playtime/60 ||
|
||||||
|
oldProfile.avatarval!=avatar.value ||
|
||||||
|
oldProfile.isPaused!=isPaused ||
|
||||||
|
oldProfile.difficulty!=difficulty ||
|
||||||
|
oldProfile.loop!=loop ||
|
||||||
|
oldProfile.itempct!=itempct ||
|
||||||
|
oldProfile.mappct!=mappct) {
|
||||||
|
System.out.println("Something has changed.");
|
||||||
|
count++;
|
||||||
|
} else {
|
||||||
|
System.out.println("All values are the same... "+oldProfile.playtime+","+playtime+"|"
|
||||||
|
+oldProfile.avatarval+","+avatar.value+"|"+oldProfile.isPaused+","+isPaused+"|"
|
||||||
|
+oldProfile.difficulty+","+difficulty+"|"+oldProfile.loop+","+loop+"|"
|
||||||
|
+oldProfile.itempct+","+itempct+"|"+oldProfile.mappct+","+mappct+"|");
|
||||||
|
}
|
||||||
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int compareAllChangedValues() {
|
public int compareAllChangedValues() {
|
||||||
int count=0;
|
int count=0;
|
||||||
if (oldProfile.healthUps!=healthUps) {
|
if (oldProfile.healthUps!=healthUps) {
|
||||||
count++;
|
count++;
|
||||||
|
//System.out.println("Health ups changed. "+(healthUps-oldProfile.healthUps));
|
||||||
}
|
}
|
||||||
if (oldProfile.attackUps!=attackUps) {
|
if (oldProfile.attackUps!=attackUps) {
|
||||||
count++;
|
count++;
|
||||||
|
//System.out.println("Attack ups changed. "+(attackUps-oldProfile.attackUps));
|
||||||
}
|
}
|
||||||
if (oldProfile.manaUps!=manaUps) {
|
if (oldProfile.manaUps!=manaUps) {
|
||||||
count++;
|
count++;
|
||||||
|
//System.out.println("Mana ups changed. "+(manaUps-oldProfile.manaUps));
|
||||||
}
|
}
|
||||||
if (oldProfile.regenUps!=regenUps) {
|
if (oldProfile.regenUps!=regenUps) {
|
||||||
count++;
|
count++;
|
||||||
|
//System.out.println("Regen ups changed. "+(regenUps-oldProfile.regenUps));
|
||||||
}
|
}
|
||||||
if (oldProfile.packUps!=packUps) {
|
if (oldProfile.packUps!=packUps) {
|
||||||
count++;
|
count++;
|
||||||
|
//System.out.println("Pack ups changed. "+(packUps-oldProfile.packUps));
|
||||||
}
|
}
|
||||||
if (oldProfile.rainbowEggCount!=rainbowEggCount) {
|
if (oldProfile.rainbowEggCount!=rainbowEggCount) {
|
||||||
|
//System.out.println("Rainbow Egg Count changed. "+(rainbowEggCount-oldProfile.rainbowEggCount));
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
for (MemoryData md : key_items.keySet()) {
|
for (MemoryData md : key_items.keySet()) {
|
||||||
if ((!oldProfile.key_items.containsKey(md) &&
|
if ((!oldProfile.key_items.containsKey(md) &&
|
||||||
key_items.containsKey(md)) || (
|
key_items.containsKey(md)) || ((
|
||||||
oldProfile.key_items.containsKey(md) &&
|
oldProfile.key_items.containsKey(md) &&
|
||||||
key_items.containsKey(md)) &&
|
key_items.containsKey(md)) &&
|
||||||
oldProfile.key_items.get(md)!=key_items.get(md)
|
oldProfile.key_items.get(md).compareTo(key_items.get(md))!=0)
|
||||||
) {
|
) {
|
||||||
|
/*if (!oldProfile.key_items.containsKey(md) &&
|
||||||
|
key_items.containsKey(md)) {
|
||||||
|
System.out.println("Key item difference: "+(md));
|
||||||
|
} else {
|
||||||
|
System.out.println("Key item value difference: "+md+":"+(oldProfile.key_items.get(md)+"->"+key_items.get(md)));
|
||||||
|
}*/
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -120,8 +159,14 @@ public class Profile {
|
|||||||
badges.containsKey(md)) || (
|
badges.containsKey(md)) || (
|
||||||
oldProfile.badges.containsKey(md) &&
|
oldProfile.badges.containsKey(md) &&
|
||||||
badges.containsKey(md)) &&
|
badges.containsKey(md)) &&
|
||||||
oldProfile.badges.get(md)!=badges.get(md)
|
oldProfile.badges.get(md).compareTo(badges.get(md))!=0
|
||||||
) {
|
) {
|
||||||
|
/*if (!oldProfile.badges.containsKey(md) &&
|
||||||
|
badges.containsKey(md)) {
|
||||||
|
System.out.println("Badge difference: "+(md));
|
||||||
|
} else {
|
||||||
|
System.out.println("Badge value difference: "+md+":"+(oldProfile.badges.get(md)+"->"+badges.get(md)));
|
||||||
|
}*/
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -339,7 +384,7 @@ public class Profile {
|
|||||||
|
|
||||||
g2.setColor(Color.BLACK);
|
g2.setColor(Color.BLACK);
|
||||||
//g2.fillRect(1, 1, 32, 32);
|
//g2.fillRect(1, 1, 32, 32);
|
||||||
g2.drawImage(avatar.getAvatarImage(), 1, 1, sigIRC.panel);
|
g2.drawImage(avatar.getAvatarImage(), 1, 1, parent.panel);
|
||||||
g2.setColor(ScrollingText.GetUserNameColor(displayName));
|
g2.setColor(ScrollingText.GetUserNameColor(displayName));
|
||||||
DrawUtils.drawOutlineText(g2, sigIRC.rabiRibiMoneyDisplayFont, 54, 26, 1, g2.getColor(), Color.BLACK, displayName);
|
DrawUtils.drawOutlineText(g2, sigIRC.rabiRibiMoneyDisplayFont, 54, 26, 1, g2.getColor(), Color.BLACK, displayName);
|
||||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.2), 50, 1, GetDifficultyColor(), Color.BLACK, GetDifficultyName());
|
DrawUtils.drawCenteredOutlineText(g2, sigIRC.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.2), 50, 1, GetDifficultyColor(), Color.BLACK, GetDifficultyName());
|
||||||
@ -354,8 +399,13 @@ public class Profile {
|
|||||||
//DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, (int)(parent.position.getWidth() - TextUtils.calculateStringBoundsFont(text, sigIRC.panel.rabiRibiMoneyDisplayFont).getWidth()) - 2, 16, 1, g2.getColor(), Color.GRAY, text);
|
//DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, (int)(parent.position.getWidth() - TextUtils.calculateStringBoundsFont(text, sigIRC.panel.rabiRibiMoneyDisplayFont).getWidth()) - 2, 16, 1, g2.getColor(), Color.GRAY, text);
|
||||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.6), 50, 2, Color.WHITE, Color.BLACK, text);
|
DrawUtils.drawCenteredOutlineText(g2, sigIRC.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.6), 50, 2, Color.WHITE, Color.BLACK, text);
|
||||||
|
|
||||||
|
if (statUpdateCacheImage!=null) {
|
||||||
|
statUpdateCacheImage.flush();
|
||||||
|
}
|
||||||
|
g2.dispose();
|
||||||
statUpdateCacheImage = tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING);
|
statUpdateCacheImage = tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING);
|
||||||
//stat_update_required = false;
|
stat_update_required = false;
|
||||||
|
System.out.println("Updated stat text for user "+username+".");
|
||||||
}
|
}
|
||||||
|
|
||||||
return statUpdateCacheImage;
|
return statUpdateCacheImage;
|
||||||
@ -398,6 +448,108 @@ public class Profile {
|
|||||||
}
|
}
|
||||||
return diffstring;
|
return diffstring;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Image getRainbowEggPanel(int w, Session session) {
|
||||||
|
BufferedImage tmp = new BufferedImage(400,175,BufferedImage.TYPE_INT_ARGB);
|
||||||
|
Graphics2D g2 = tmp.createGraphics();
|
||||||
|
if (Profile.darkRainbowEggImage==null) {
|
||||||
|
Profile.darkRainbowEggImage = DrawUtils.getBlendedImage(g2, RabiRaceModule.image_map.get("easter_egg.png"), new Color(0,0,0,192), RabiRaceModule.window);
|
||||||
|
Profile.rainbowEggImage = DrawUtils.getBlendedImage(g2, RabiRaceModule.image_map.get("easter_egg.png"), RabiRaceModule.rainbowcycler.getCycleColor(), RabiRaceModule.window);
|
||||||
|
} else {
|
||||||
|
Profile.rainbowEggImage.flush();
|
||||||
|
Profile.rainbowEggImage = DrawUtils.getBlendedImage(g2, RabiRaceModule.image_map.get("easter_egg.png"), RabiRaceModule.rainbowcycler.getCycleColor(), RabiRaceModule.window);
|
||||||
|
//System.out.println("Rainbow egg color is "+RabiRaceModule.rainbowcycler.getCycleColor());
|
||||||
|
}
|
||||||
|
//DrawUtils.drawTextFont(g, sigIRC.panel.userFont, parent.position.getX(), parent.position.getY()+26, Color.BLACK, "Values: "+readIntFromMemory(MemoryOffset.DLC_ITEM1)+","+readIntFromMemory(MemoryOffset.DLC_ITEM2)+","+readIntFromMemory(MemoryOffset.DLC_ITEM3)+","+readIntFromMemory(MemoryOffset.DLC_ITEM4));
|
||||||
|
final int border=20;
|
||||||
|
final int width=(int)(tmp.getWidth()-border*2);
|
||||||
|
int spacing=width/5;
|
||||||
|
int shiftyval = 0;
|
||||||
|
double iconsize = 1;
|
||||||
|
final int icon_size = 24;
|
||||||
|
int rainbowEggLimit = 0;
|
||||||
|
|
||||||
|
int gamemode = -1;
|
||||||
|
if (RabiRaceModule.mySession!=null) {
|
||||||
|
gamemode = RabiRaceModule.mySession.gamemode;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gamemode!=-1) {
|
||||||
|
switch (gamemode) {
|
||||||
|
case 0:{ //Egg Hunt.
|
||||||
|
if (session.eggCount>0) {
|
||||||
|
spacing = width/session.eggCount;
|
||||||
|
rainbowEggLimit = session.eggCount;
|
||||||
|
} else {
|
||||||
|
spacing = width/5;
|
||||||
|
rainbowEggLimit = session.eggCount;
|
||||||
|
}
|
||||||
|
//Image img = RabiRaceModule.image_map.get("easter_egg.png");
|
||||||
|
for (int i=0;i<session.eggCount;i++) {
|
||||||
|
//Color col = (rainbowEggCount>i)?RabiRaceModule.rainbowcycler.getCycleColor():new Color(0,0,0,192);
|
||||||
|
//DrawUtils.drawImage(g2, img, (int)(border+i*spacing-img.getWidth(parent.panel)/4),(int)(36),col,parent.panel);
|
||||||
|
Image img;
|
||||||
|
if (rainbowEggCount>i) {
|
||||||
|
img = Profile.rainbowEggImage;
|
||||||
|
} else {
|
||||||
|
img = Profile.darkRainbowEggImage;
|
||||||
|
}
|
||||||
|
g2.drawImage(img, (int)(border+i*spacing-img.getWidth(parent.panel)/4),(int)(36), parent.panel);
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
shiftyval = -RabiRaceModule.image_map.get("easter_egg.png").getWidth(parent.panel)/2;
|
||||||
|
iconsize = 1;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
Image img = RabiRaceModule.image_map.get("easter_egg.png");
|
||||||
|
Color col = RabiRaceModule.rainbowcycler.getCycleColor();
|
||||||
|
DrawUtils.drawImage(g2, img, (int)(border+((1.5)*spacing)-img.getWidth(sigIRC.panel)/4),(int)(36),col,sigIRC.panel);
|
||||||
|
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.programFont, (int)(border+((3)*spacing)-img.getWidth(sigIRC.panel)/4),(int)12+img.getHeight(sigIRC.panel), 1, Color.WHITE, Color.BLUE,"x"+rainbowEggCount);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
int size = key_items.size();
|
||||||
|
int count = 0;
|
||||||
|
try {
|
||||||
|
int i=0;
|
||||||
|
Image[] imgs = new Image[]{RabiRaceModule.image_map.get("health_up.png"),
|
||||||
|
RabiRaceModule.image_map.get("mana_up.png"),
|
||||||
|
RabiRaceModule.image_map.get("regen_up.png"),
|
||||||
|
RabiRaceModule.image_map.get("pack_up.png"),
|
||||||
|
RabiRaceModule.image_map.get("attack_up.png")};
|
||||||
|
int[] amts = new int[]{
|
||||||
|
healthUps,
|
||||||
|
manaUps,
|
||||||
|
regenUps,
|
||||||
|
packUps,
|
||||||
|
attackUps,
|
||||||
|
};
|
||||||
|
if (rainbowEggCount>rainbowEggLimit) {
|
||||||
|
imgs = Arrays.copyOf(imgs, imgs.length+1);
|
||||||
|
imgs[imgs.length-1] = RabiRaceModule.image_map.get("easter_egg.png");
|
||||||
|
amts = Arrays.copyOf(amts, amts.length+1);
|
||||||
|
amts[amts.length-1] = rainbowEggCount;
|
||||||
|
spacing = width/6;
|
||||||
|
}
|
||||||
|
//g2.drawImage(RabiRaceModule.image_map.get("bunny_strike.png"),(int)(+border+(i++)*(spacing)-img2.getWidth(sigIRC.panel)/4),(int)(+96+56), (int)icon_size, (int)icon_size, sigIRC.panel);
|
||||||
|
int counting=0;
|
||||||
|
for (Image img : imgs) {
|
||||||
|
if (counting++==5) {
|
||||||
|
g2.drawImage(img, (int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval,(int)icon_size,(int)icon_size,parent.panel);
|
||||||
|
//DrawUtils.drawImageScaled(g2, img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, RabiRaceModule.rainbowcycler.getCycleColor(), parent.panel);
|
||||||
|
}
|
||||||
|
DrawUtils.drawCenteredOutlineText(g2, sigIRC.programFont, (int)((+border+((i)*(spacing))-icon_size/2)+(spacing/2)+4), (int)(+96+56+icon_size+12)+shiftyval, 1, Color.WHITE, Color.BLUE, Integer.toString(amts[i++]));
|
||||||
|
}
|
||||||
|
} catch (ConcurrentModificationException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
g2.dispose();
|
||||||
|
//g.drawImage(tmp, (int)parent.position.getX(), (int)parent.position.getY(), 120, 64, sigIRC.panel);
|
||||||
|
//image_display_update_required=false;
|
||||||
|
//System.out.println("Updated Image Display for user "+username+".");
|
||||||
|
}
|
||||||
|
|
||||||
public Image getStatPanel(int w, Session session) {
|
public Image getStatPanel(int w, Session session) {
|
||||||
|
|
||||||
@ -428,10 +580,17 @@ public class Profile {
|
|||||||
spacing = width/5;
|
spacing = width/5;
|
||||||
rainbowEggLimit = session.eggCount;
|
rainbowEggLimit = session.eggCount;
|
||||||
}
|
}
|
||||||
Image img = RabiRaceModule.image_map.get("easter_egg.png");
|
//Image img = RabiRaceModule.image_map.get("easter_egg.png");
|
||||||
for (int i=0;i<session.eggCount;i++) {
|
for (int i=0;i<session.eggCount;i++) {
|
||||||
Color col = (rainbowEggCount>i)?RabiRaceModule.rainbowcycler.getCycleColor():new Color(0,0,0,192);
|
//Color col = (rainbowEggCount>i)?RabiRaceModule.rainbowcycler.getCycleColor():new Color(0,0,0,192);
|
||||||
DrawUtils.drawImage(g2, img, (int)(border+i*spacing-img.getWidth(sigIRC.panel)/4),(int)(36),col,sigIRC.panel);
|
//DrawUtils.drawImage(g2, img, (int)(border+i*spacing-img.getWidth(parent.panel)/4),(int)(36),col,parent.panel);
|
||||||
|
Image img;
|
||||||
|
if (rainbowEggCount>i) {
|
||||||
|
img = Profile.rainbowEggImage;
|
||||||
|
} else {
|
||||||
|
img = Profile.darkRainbowEggImage;
|
||||||
|
}
|
||||||
|
g2.drawImage(img, (int)(border+i*spacing-img.getWidth(parent.panel)/4),(int)(36), parent.panel);
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
case 1:{ //Item Hunt.
|
case 1:{ //Item Hunt.
|
||||||
@ -443,16 +602,16 @@ public class Profile {
|
|||||||
(badges.containsKey(item) &&
|
(badges.containsKey(item) &&
|
||||||
badges.get(item)>=1)) {
|
badges.get(item)>=1)) {
|
||||||
//DrawUtils.drawImage(g2, item.getImage(), (int)(border+i*spacing-item.getImage().getWidth(sigIRC.panel)/4),(int)(36),col,sigIRC.panel);
|
//DrawUtils.drawImage(g2, item.getImage(), (int)(border+i*spacing-item.getImage().getWidth(sigIRC.panel)/4),(int)(36),col,sigIRC.panel);
|
||||||
g2.drawImage(item.getImage(), (int)(border+i*spacing),(int)(36+16), icon_size*2, icon_size*2, sigIRC.panel);
|
g2.drawImage(item.getImage(), (int)(border+i*spacing),(int)(36+16), icon_size*2, icon_size*2, parent.panel);
|
||||||
} else {
|
} else {
|
||||||
DrawUtils.drawImageScaled(g2, item.getImage(), (int)(border+i*spacing),(int)(36+16),icon_size*2, icon_size*2,new Color(0,0,0,192),sigIRC.panel);
|
DrawUtils.drawImageScaled(g2, item.getImage(), (int)(border+i*spacing),(int)(36+16),icon_size*2, icon_size*2,new Color(0,0,0,192),parent.panel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spacing=width/5;
|
spacing=width/5;
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
shiftyval = -RabiRaceModule.image_map.get("easter_egg.png").getWidth(sigIRC.panel)/2;
|
shiftyval = -RabiRaceModule.image_map.get("easter_egg.png").getWidth(parent.panel)/2;
|
||||||
iconsize = 1;
|
iconsize = 1;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -470,15 +629,15 @@ public class Profile {
|
|||||||
if (key_items.get(data)<0) {
|
if (key_items.get(data)<0) {
|
||||||
Image img = data.getImage().getScaledInstance(icon_size, icon_size, Image.SCALE_DEFAULT);
|
Image img = data.getImage().getScaledInstance(icon_size, icon_size, Image.SCALE_DEFAULT);
|
||||||
if (size*icon_size<width) {
|
if (size*icon_size<width) {
|
||||||
DrawUtils.drawImageScaled(g2, img, (int)(+border+((count++)*icon_size)), (int)(+96+8)+shiftyval, (int)icon_size*iconsize, (int)icon_size*iconsize, new Color(0,0,0,128), sigIRC.panel);
|
DrawUtils.drawImageScaled(g2, img, (int)(+border+((count++)*icon_size)), (int)(+96+8)+shiftyval, (int)icon_size*iconsize, (int)icon_size*iconsize, new Color(0,0,0,128), parent.panel);
|
||||||
} else {
|
} else {
|
||||||
DrawUtils.drawImageScaled(g2, img, (int)(+border+((width/size)*(count++))), (int)(+96+8)+shiftyval, (int)icon_size*iconsize, (int)icon_size*iconsize, new Color(0,0,0,128), sigIRC.panel);
|
DrawUtils.drawImageScaled(g2, img, (int)(+border+((width/size)*(count++))), (int)(+96+8)+shiftyval, (int)icon_size*iconsize, (int)icon_size*iconsize, new Color(0,0,0,128), parent.panel);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (size*icon_size<width) {
|
if (size*icon_size<width) {
|
||||||
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+8)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), sigIRC.panel);
|
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+8)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), parent.panel);
|
||||||
} else {
|
} else {
|
||||||
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+8)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), sigIRC.panel);
|
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+8)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), parent.panel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -486,12 +645,12 @@ public class Profile {
|
|||||||
size = badges.size();
|
size = badges.size();
|
||||||
for (MemoryData data : badges.keySet()) {
|
for (MemoryData data : badges.keySet()) {
|
||||||
if (size*icon_size<width) {
|
if (size*icon_size<width) {
|
||||||
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+32)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), sigIRC.panel);
|
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+32)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), parent.panel);
|
||||||
if (badges.get(data)==2) {
|
if (badges.get(data)==2) {
|
||||||
DrawUtils.drawOutlineText(g2, sigIRC.smallFont, (int)(+border+((count-1)*icon_size))+4, (int)(+96+32)+icon_size+shiftyval, 1, Color.WHITE, TEAL, "E");
|
DrawUtils.drawOutlineText(g2, sigIRC.smallFont, (int)(+border+((count-1)*icon_size))+4, (int)(+96+32)+icon_size+shiftyval, 1, Color.WHITE, TEAL, "E");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+32)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), sigIRC.panel);
|
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+32)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), parent.panel);
|
||||||
if (badges.get(data)==2) {
|
if (badges.get(data)==2) {
|
||||||
DrawUtils.drawOutlineText(g2, sigIRC.smallFont, (int)(+border+((width/size)*(count-1)))+4, (int)(+96+32)+icon_size+shiftyval, 1, Color.WHITE, TEAL, "E");
|
DrawUtils.drawOutlineText(g2, sigIRC.smallFont, (int)(+border+((width/size)*(count-1)))+4, (int)(+96+32)+icon_size+shiftyval, 1, Color.WHITE, TEAL, "E");
|
||||||
}
|
}
|
||||||
@ -521,19 +680,23 @@ public class Profile {
|
|||||||
int counting=0;
|
int counting=0;
|
||||||
for (Image img : imgs) {
|
for (Image img : imgs) {
|
||||||
if (counting++==5) {
|
if (counting++==5) {
|
||||||
DrawUtils.drawImageScaled(g2, img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, RabiRaceModule.rainbowcycler.getCycleColor(), sigIRC.panel);
|
g2.drawImage(img, (int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval,(int)icon_size,(int)icon_size,parent.panel);
|
||||||
|
//DrawUtils.drawImageScaled(g2, img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, RabiRaceModule.rainbowcycler.getCycleColor(), parent.panel);
|
||||||
} else {
|
} else {
|
||||||
g2.drawImage(img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, sigIRC.panel);
|
g2.drawImage(img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, parent.panel);
|
||||||
}
|
}
|
||||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.programFont, (int)((+border+((i)*(spacing))-icon_size/2)+(spacing/2)+4), (int)(+96+56+icon_size+12)+shiftyval, 1, Color.WHITE, Color.BLUE, Integer.toString(amts[i++]));
|
DrawUtils.drawCenteredOutlineText(g2, sigIRC.programFont, (int)((+border+((i)*(spacing))-icon_size/2)+(spacing/2)+4), (int)(+96+56+icon_size+12)+shiftyval, 1, Color.WHITE, Color.BLUE, Integer.toString(amts[i++]));
|
||||||
}
|
}
|
||||||
} catch (ConcurrentModificationException e) {
|
} catch (ConcurrentModificationException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
if (imageDisplayUpdateImage!=null) {
|
||||||
|
imageDisplayUpdateImage.flush();
|
||||||
}
|
}
|
||||||
imageDisplayUpdateImage = tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING);
|
imageDisplayUpdateImage = tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING);
|
||||||
//g.drawImage(tmp, (int)parent.position.getX(), (int)parent.position.getY(), 120, 64, sigIRC.panel);
|
//g.drawImage(tmp, (int)parent.position.getX(), (int)parent.position.getY(), 120, 64, sigIRC.panel);
|
||||||
//image_display_update_required=false;
|
image_display_update_required=false;
|
||||||
//System.out.println("Updated Image Display.");
|
System.out.println("Updated Image Display for user "+username+".");
|
||||||
}
|
}
|
||||||
|
|
||||||
return imageDisplayUpdateImage;
|
return imageDisplayUpdateImage;
|
||||||
@ -600,8 +763,8 @@ public class Profile {
|
|||||||
for (Profile p : players) {
|
for (Profile p : players) {
|
||||||
Image panel = p.getStatPanel(w,session);
|
Image panel = p.getStatPanel(w,session);
|
||||||
Image panel2 = p.getStatText(w,session);
|
Image panel2 = p.getStatText(w,session);
|
||||||
g.drawImage(panel,(int)(x+xx*panel.getWidth(sigIRC.panel)/((rows+cols)/2d)),(int)(y+yy*panel.getHeight(sigIRC.panel)/((rows+cols)/2d)),(int)(panel.getWidth(sigIRC.panel)/((rows+cols)/2d)),(int)(panel.getHeight(sigIRC.panel)/((rows+cols)/2d)),sigIRC.panel);
|
g.drawImage(panel,(int)(x+xx*panel.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(y+yy*panel.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),RabiRaceModule.module.panel);
|
||||||
g.drawImage(panel2,(int)(x+xx*panel2.getWidth(sigIRC.panel)/((rows+cols)/2d)),(int)(y+yy*panel2.getHeight(sigIRC.panel)/((rows+cols)/2d)),(int)(panel2.getWidth(sigIRC.panel)/((rows+cols)/2d)),(int)(panel2.getHeight(sigIRC.panel)/((rows+cols)/2d)),sigIRC.panel);
|
g.drawImage(panel2,(int)(x+xx*panel2.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(y+yy*panel2.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel2.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel2.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),RabiRaceModule.module.panel);
|
||||||
if (xx+1<cols) {
|
if (xx+1<cols) {
|
||||||
xx++;
|
xx++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -49,6 +49,7 @@ import sig.modules.utils.PsapiTools;
|
|||||||
import sig.utils.DrawUtils;
|
import sig.utils.DrawUtils;
|
||||||
import sig.utils.FileUtils;
|
import sig.utils.FileUtils;
|
||||||
import sig.utils.TextUtils;
|
import sig.utils.TextUtils;
|
||||||
|
import sig.windows.ProgramWindow;
|
||||||
|
|
||||||
public class RabiRaceModule extends Module{
|
public class RabiRaceModule extends Module{
|
||||||
final static String ITEMS_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/items/";
|
final static String ITEMS_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/items/";
|
||||||
@ -80,7 +81,7 @@ public class RabiRaceModule extends Module{
|
|||||||
public static List<MemoryData> key_items_list = new ArrayList<MemoryData>();
|
public static List<MemoryData> key_items_list = new ArrayList<MemoryData>();
|
||||||
public static List<MemoryData> badges_list = new ArrayList<MemoryData>();
|
public static List<MemoryData> badges_list = new ArrayList<MemoryData>();
|
||||||
|
|
||||||
public RabiRaceModule(Rectangle2D bounds, String moduleName) {
|
public RabiRaceModule(Rectangle bounds, String moduleName) {
|
||||||
super(bounds, moduleName);
|
super(bounds, moduleName);
|
||||||
//Initialize();
|
//Initialize();
|
||||||
Initialize();
|
Initialize();
|
||||||
@ -281,8 +282,11 @@ public class RabiRaceModule extends Module{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
|
super.run();
|
||||||
if (foundRabiRibi) {
|
if (foundRabiRibi) {
|
||||||
rainbowcycler.run();
|
rainbowcycler.run();
|
||||||
|
//Profile.rainbowEggImage.flush();
|
||||||
|
//Profile.rainbowEggImage = DrawUtils.getBlendedImage(RabiRaceModule.module.panel.getGraphics().create(), RabiRaceModule.image_map.get("easter_egg.png"), RabiRaceModule.rainbowcycler.getCycleColor(), RabiRaceModule.window);
|
||||||
if (window!=null) {
|
if (window!=null) {
|
||||||
window.run();
|
window.run();
|
||||||
}
|
}
|
||||||
@ -302,6 +306,7 @@ public class RabiRaceModule extends Module{
|
|||||||
//System.out.println("Called.");
|
//System.out.println("Called.");
|
||||||
int paused = readIntFromMemory(MemoryOffset.PAUSED);
|
int paused = readIntFromMemory(MemoryOffset.PAUSED);
|
||||||
float itempct = readFloatFromMemory(MemoryOffset.ITEM_PERCENT);
|
float itempct = readFloatFromMemory(MemoryOffset.ITEM_PERCENT);
|
||||||
|
myProfile.oldProfile.isPaused = myProfile.isPaused;
|
||||||
myProfile.isPaused = paused==1;
|
myProfile.isPaused = paused==1;
|
||||||
//System.out.println(itempct+","+paused);
|
//System.out.println(itempct+","+paused);
|
||||||
if (paused==0 && itempct>=0) {
|
if (paused==0 && itempct>=0) {
|
||||||
@ -324,8 +329,16 @@ public class RabiRaceModule extends Module{
|
|||||||
if (myProfile.compareAllChangedValues()>0) {
|
if (myProfile.compareAllChangedValues()>0) {
|
||||||
myProfile.image_display_update_required=true;
|
myProfile.image_display_update_required=true;
|
||||||
}
|
}
|
||||||
myProfile.stat_update_required=true;
|
if (myProfile.compareAllChangedStatValues()>0) {
|
||||||
|
myProfile.stat_update_required=true;
|
||||||
|
}
|
||||||
|
myProfile.oldProfile.avatarval = myProfile.avatar.value;
|
||||||
firstUpdate=false;
|
firstUpdate=false;
|
||||||
|
} else
|
||||||
|
if (myProfile.compareAllChangedStatValues()>0) {
|
||||||
|
myProfile.archiveAllValues();
|
||||||
|
myProfile.oldProfile.avatarval = myProfile.avatar.value;
|
||||||
|
myProfile.stat_update_required=true;
|
||||||
}
|
}
|
||||||
if (mySession!=null) {
|
if (mySession!=null) {
|
||||||
for (Profile p : mySession.getPlayers()) {
|
for (Profile p : mySession.getPlayers()) {
|
||||||
@ -342,8 +355,13 @@ public class RabiRaceModule extends Module{
|
|||||||
public void ApplyConfigWindowProperties() {
|
public void ApplyConfigWindowProperties() {
|
||||||
sigIRC.rabiracemodule_X=(int)position.getX();
|
sigIRC.rabiracemodule_X=(int)position.getX();
|
||||||
sigIRC.rabiracemodule_Y=(int)position.getY();
|
sigIRC.rabiracemodule_Y=(int)position.getY();
|
||||||
|
sigIRC.rabiracemodule_width=(int)position.getWidth();
|
||||||
|
sigIRC.rabiracemodule_height=(int)position.getHeight();
|
||||||
sigIRC.config.setInteger("RABIRACE_module_X", sigIRC.rabiracemodule_X);
|
sigIRC.config.setInteger("RABIRACE_module_X", sigIRC.rabiracemodule_X);
|
||||||
sigIRC.config.setInteger("RABIRACE_module_Y", sigIRC.rabiracemodule_Y);
|
sigIRC.config.setInteger("RABIRACE_module_Y", sigIRC.rabiracemodule_Y);
|
||||||
|
sigIRC.config.setInteger("RABIRACE_module_width", sigIRC.rabiracemodule_width);
|
||||||
|
sigIRC.config.setInteger("RABIRACE_module_height", sigIRC.rabiracemodule_height);
|
||||||
|
sigIRC.config.saveProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*public int readIntFromErinaData(MemoryOffset val) {
|
/*public int readIntFromErinaData(MemoryOffset val) {
|
||||||
@ -439,29 +457,29 @@ public class RabiRaceModule extends Module{
|
|||||||
super.draw(g);
|
super.draw(g);
|
||||||
|
|
||||||
if (!foundRabiRibi) {
|
if (!foundRabiRibi) {
|
||||||
DrawUtils.drawTextFont(g, sigIRC.userFont, position.getX(), position.getY()+26, Color.BLACK, "Rabi-Ribi not found! Please start it.");
|
DrawUtils.drawTextFont(g, sigIRC.userFont, 0, 0+26, Color.BLACK, "Rabi-Ribi not found! Please start it.");
|
||||||
} else {
|
} else {
|
||||||
//myProfile.draw(g);
|
//myProfile.draw(g);
|
||||||
Image panel = myProfile.getStatPanel((int)position.getWidth(),mySession);
|
Image panel = myProfile.getStatPanel((int)position.getWidth()-24,mySession);
|
||||||
|
//System.out.println(ProgramWindow.frame.lastMouseX+","+ProgramWindow.frame.lastMouseY+";"+position.getX()+","+position.getY());
|
||||||
if (sigIRC.panel.lastMouseX>=position.getX() &&
|
if (ProgramWindow.frame.lastMouseX>=position.getX() &&
|
||||||
sigIRC.panel.lastMouseX<=position.getX()+(int)((position.getWidth()/400)*50) &&
|
ProgramWindow.frame.lastMouseX<=position.getX()+(int)((position.getWidth()/400)*50) &&
|
||||||
sigIRC.panel.lastMouseY>=position.getY() &&
|
ProgramWindow.frame.lastMouseY>=position.getY()+Module.WINDOW_EXTRA_BORDER &&
|
||||||
sigIRC.panel.lastMouseY<=position.getY()+(int)(((position.getWidth()/400)*50))) {
|
ProgramWindow.frame.lastMouseY<=position.getY()+Module.WINDOW_EXTRA_BORDER+(int)(((position.getWidth()/400)*50))) {
|
||||||
mouseoverAvatar=true;
|
mouseoverAvatar=true;
|
||||||
Color ident = g.getColor();
|
Color ident = g.getColor();
|
||||||
g.setColor(new Color(196,196,196,128));
|
g.setColor(new Color(196,196,196,128));
|
||||||
g.fillRect((int)(position.getX()+1), (int)(position.getY()+1), (int)((position.getWidth()/400)*50), (int)((position.getWidth()/400)*50));
|
g.fillRect((int)(0+1), (int)(0+1), (int)((position.getWidth()/400)*50), (int)((position.getWidth()/400)*50));
|
||||||
g.setColor(ident);
|
g.setColor(ident);
|
||||||
//System.out.println("Mouse over avatar.");
|
//System.out.println("Mouse over avatar.");
|
||||||
} else {
|
} else {
|
||||||
mouseoverAvatar=false;
|
mouseoverAvatar=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
g.drawImage(panel, (int)position.getX(), (int)position.getY(), sigIRC.panel);
|
g.drawImage(panel, (int)0, (int)0, module.panel);
|
||||||
g.drawImage(myProfile.getStatText((int)position.getWidth(),mySession), (int)position.getX(), (int)position.getY(), sigIRC.panel);
|
g.drawImage(myProfile.getStatText((int)position.getWidth()-24,mySession), (int)0, (int)0, module.panel);
|
||||||
|
|
||||||
//Profile.DrawMultiPanel(g, (int)(position.getX()), (int)(position.getY())+panel.getHeight(sigIRC.panel), (int)position.getWidth(), testing);
|
//Profile.DrawMultiPanel(g, (int)(0), (int)(0)+panel.getHeight(sigIRC.panel), (int)position.getWidth(), testing);
|
||||||
if (mySession!=null) {
|
if (mySession!=null) {
|
||||||
List<Profile> sessionPlayers = new ArrayList<Profile>();
|
List<Profile> sessionPlayers = new ArrayList<Profile>();
|
||||||
for (Profile p : mySession.getPlayers()) {
|
for (Profile p : mySession.getPlayers()) {
|
||||||
@ -470,7 +488,7 @@ public class RabiRaceModule extends Module{
|
|||||||
//System.out.println("Found unique player "+p);
|
//System.out.println("Found unique player "+p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Profile.DrawMultiPanel(g, (int)(position.getX()), (int)(position.getY())+panel.getHeight(sigIRC.panel), (int)position.getWidth(), mySession);
|
Profile.DrawMultiPanel(g, (int)(0), (int)(0)+panel.getHeight(module.panel), (int)position.getWidth()-24, mySession);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstCheck) {
|
if (firstCheck) {
|
||||||
@ -480,7 +498,7 @@ public class RabiRaceModule extends Module{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
g.setColor(Color.BLACK);
|
g.setColor(Color.BLACK);
|
||||||
g.fillRect((int)(position.getX()), (int)(position.getY()+position.getHeight()-28-20), (int)(position.getWidth()), 20);
|
g.fillRect((int)(0), (int)(0+position.getHeight()-28-20), (int)(position.getWidth()), 20);
|
||||||
for (int i=0;i<messages.size();i++) {
|
for (int i=0;i<messages.size();i++) {
|
||||||
messages.get(i).draw(g);
|
messages.get(i).draw(g);
|
||||||
}
|
}
|
||||||
@ -512,7 +530,7 @@ public class RabiRaceModule extends Module{
|
|||||||
|
|
||||||
public void draw(Graphics g) {
|
public void draw(Graphics g) {
|
||||||
if (x<position.getWidth()) {
|
if (x<position.getWidth()) {
|
||||||
DrawUtils.drawOutlineText(g, sigIRC.rabiRibiTinyDisplayFont, position.getX()+x, position.getY()+y-6, 2, Color.WHITE, Color.GRAY, msg);
|
DrawUtils.drawOutlineText(g, sigIRC.rabiRibiTinyDisplayFont, 0+x, 0+y-6, 2, Color.WHITE, Color.GRAY, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,4 +186,4 @@ class OffsetHelper{
|
|||||||
final static long MEMORY_OFFSET_V188_TO_V1881 = -0x10;
|
final static long MEMORY_OFFSET_V188_TO_V1881 = -0x10;
|
||||||
final static long MEMORY_OFFSET_V185_TO_V1881 = KEY_ITEM_OFFSET_V185_TO_V188+MEMORY_OFFSET_V188_TO_V1881;
|
final static long MEMORY_OFFSET_V185_TO_V1881 = KEY_ITEM_OFFSET_V185_TO_V188+MEMORY_OFFSET_V188_TO_V1881;
|
||||||
final static long MEMORY_OFFSET_V175_TO_V1881 = KEY_ITEM_OFFSET_V175_TO_V188+MEMORY_OFFSET_V188_TO_V1881;
|
final static long MEMORY_OFFSET_V175_TO_V1881 = KEY_ITEM_OFFSET_V175_TO_V188+MEMORY_OFFSET_V188_TO_V1881;
|
||||||
}
|
}
|
@ -14,6 +14,7 @@ import sig.Module;
|
|||||||
import sig.TextRow;
|
import sig.TextRow;
|
||||||
import sig.sigIRC;
|
import sig.sigIRC;
|
||||||
import sig.utils.FileUtils;
|
import sig.utils.FileUtils;
|
||||||
|
import sig.windows.ProgramWindow;
|
||||||
|
|
||||||
public class ScrollingChatModule extends Module{
|
public class ScrollingChatModule extends Module{
|
||||||
|
|
||||||
@ -76,7 +77,7 @@ public class ScrollingChatModule extends Module{
|
|||||||
for (int i=0;i<sigIRC.textobj.size();i++) {
|
for (int i=0;i<sigIRC.textobj.size();i++) {
|
||||||
if (sigIRC.textobj.get(i).isActive()) {
|
if (sigIRC.textobj.get(i).isActive()) {
|
||||||
if (sigIRC.overlayMode) {
|
if (sigIRC.overlayMode) {
|
||||||
if (!sigIRC.textobj.get(i).intersects((int)(sigIRC.panel.lastMouseX-position.getX()),(int)(sigIRC.panel.lastMouseY-position.getY()))) {
|
if (!sigIRC.textobj.get(i).intersects((int)(ProgramWindow.frame.lastMouseX-position.getX()),(int)(ProgramWindow.frame.lastMouseY-position.getY()))) {
|
||||||
sigIRC.textobj.get(i).setVisible(true);
|
sigIRC.textobj.get(i).setVisible(true);
|
||||||
sigIRC.textobj.get(i).draw(g);
|
sigIRC.textobj.get(i).draw(g);
|
||||||
} else {
|
} else {
|
||||||
|
@ -377,27 +377,30 @@ public class sigIRC{
|
|||||||
public static void DownloadProgramUpdate() {
|
public static void DownloadProgramUpdate() {
|
||||||
//System.out.println("Last commit size was "+GithubUtils.getSizeOfFileFromLatestGithubCommit("sigIRCv2.jar")+"B");
|
//System.out.println("Last commit size was "+GithubUtils.getSizeOfFileFromLatestGithubCommit("sigIRCv2.jar")+"B");
|
||||||
if (autoUpdateProgram==0) {
|
if (autoUpdateProgram==0) {
|
||||||
File updatedir = new File(sigIRC.BASEDIR+"sigIRC/updates/");
|
Thread t = new Thread(()->{
|
||||||
updatedir.mkdirs();
|
File updatedir = new File(sigIRC.BASEDIR+"sigIRC/updates/");
|
||||||
File controllerdir = new File(ControllerModule.CONTROLLERPATH);
|
updatedir.mkdirs();
|
||||||
controllerdir.mkdirs();
|
File controllerdir = new File(ControllerModule.CONTROLLERPATH);
|
||||||
File programFile = new File(sigIRC.BASEDIR+"sigIRC/updates/sigIRCv2.jar");
|
controllerdir.mkdirs();
|
||||||
File currentProgramFile = new File(sigIRC.BASEDIR+"sigIRCv2.jar");
|
File programFile = new File(sigIRC.BASEDIR+"sigIRC/updates/sigIRCv2.jar");
|
||||||
System.out.println("File size is "+currentProgramFile.length());
|
File currentProgramFile = new File(sigIRC.BASEDIR+"sigIRCv2.jar");
|
||||||
long fileSize = GithubUtils.getSizeOfFileFromLatestGithubCommit("sigIRCv2.jar");
|
System.out.println("File size is "+currentProgramFile.length());
|
||||||
System.out.println("File size on Github is "+fileSize);
|
long fileSize = GithubUtils.getSizeOfFileFromLatestGithubCommit("sigIRCv2.jar");
|
||||||
if (fileSize!=programFile.length()) {
|
System.out.println("File size on Github is "+fileSize);
|
||||||
System.out.println("File size on Github varies from currently running program... Downloading new program.");
|
if (fileSize!=programFile.length()) {
|
||||||
try {
|
System.out.println("File size on Github varies from currently running program... Downloading new program.");
|
||||||
if (programFile.exists()) {
|
try {
|
||||||
programFile.delete();
|
if (programFile.exists()) {
|
||||||
|
programFile.delete();
|
||||||
|
}
|
||||||
|
org.apache.commons.io.FileUtils.copyURLToFile(new URL(sigIRC.PROGRAM_EXECUTABLE_URL),programFile);
|
||||||
|
sigIRC.updateAvailable=true;
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL(sigIRC.PROGRAM_EXECUTABLE_URL),programFile);
|
|
||||||
sigIRC.updateAvailable=true;
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
t.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +106,17 @@ public class DrawUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Image getBlendedImage(Graphics g, Image img, Color blend_col, ImageObserver source) {
|
||||||
|
BufferedImage tmp = new BufferedImage(img.getWidth(source),img.getHeight(source),BufferedImage.TYPE_INT_ARGB);
|
||||||
|
Graphics2D g2 = tmp.createGraphics();
|
||||||
|
g2.drawImage(img, 0, 0, null);
|
||||||
|
g2.setComposite(AlphaComposite.SrcAtop);
|
||||||
|
g2.setColor(blend_col);
|
||||||
|
g2.fillRect(0, 0, img.getWidth(source), img.getHeight(source));
|
||||||
|
g2.dispose();
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
public static void drawImage(Graphics g, Image img, double x, double y, Color blend_col, ImageObserver source) {
|
public static void drawImage(Graphics g, Image img, double x, double y, Color blend_col, ImageObserver source) {
|
||||||
BufferedImage tmp = new BufferedImage(img.getWidth(source),img.getHeight(source),BufferedImage.TYPE_INT_ARGB);
|
BufferedImage tmp = new BufferedImage(img.getWidth(source),img.getHeight(source),BufferedImage.TYPE_INT_ARGB);
|
||||||
Graphics2D g2 = tmp.createGraphics();
|
Graphics2D g2 = tmp.createGraphics();
|
||||||
|
@ -108,6 +108,7 @@ public class IntroDialog extends JFrame{
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
moduleButtons = new ModuleButton[]{
|
moduleButtons = new ModuleButton[]{
|
||||||
new ModuleButton("Scrolling Chat"),
|
new ModuleButton("Scrolling Chat"),
|
||||||
new ModuleButton("Chat Log"),
|
new ModuleButton("Chat Log"),
|
||||||
|
@ -10,11 +10,11 @@ import javax.swing.event.ChangeListener;
|
|||||||
import sig.Module;
|
import sig.Module;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
class ModuleButton extends JToggleButton{
|
class ModuleSelectButton extends JToggleButton{
|
||||||
String label = "";
|
String label = "";
|
||||||
ModuleButton button;
|
ModuleSelectButton button;
|
||||||
Module myModule;
|
Module myModule;
|
||||||
public ModuleButton(String label, Module module) {
|
public ModuleSelectButton(String label, Module module) {
|
||||||
this.label=label;
|
this.label=label;
|
||||||
this.button=this;
|
this.button=this;
|
||||||
this.myModule=module;
|
this.myModule=module;
|
@ -3,6 +3,7 @@ package sig.windows;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.GridLayout;
|
import java.awt.GridLayout;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
|
import java.awt.MouseInfo;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -33,6 +34,7 @@ import sig.Module;
|
|||||||
import sig.MyPanel;
|
import sig.MyPanel;
|
||||||
import sig.sigIRC;
|
import sig.sigIRC;
|
||||||
import sig.modules.ChatLogModule;
|
import sig.modules.ChatLogModule;
|
||||||
|
import sig.modules.RabiRaceModule;
|
||||||
import sig.modules.ScrollingChatModule;
|
import sig.modules.ScrollingChatModule;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@ -40,9 +42,16 @@ public class ProgramWindow extends JFrame{
|
|||||||
|
|
||||||
public static Icon deselected_icon,selected_icon;
|
public static Icon deselected_icon,selected_icon;
|
||||||
|
|
||||||
List<ModuleButton> buttons = new ArrayList<ModuleButton>();
|
List<ModuleSelectButton> buttons = new ArrayList<ModuleSelectButton>();
|
||||||
|
|
||||||
|
public int lastMouseX = 0;
|
||||||
|
|
||||||
|
public int lastMouseY = 0;
|
||||||
|
|
||||||
|
public static ProgramWindow frame;
|
||||||
|
|
||||||
public ProgramWindow() {
|
public ProgramWindow() {
|
||||||
|
ProgramWindow.frame=this;
|
||||||
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
||||||
scheduler.scheduleWithFixedDelay(()->{
|
scheduler.scheduleWithFixedDelay(()->{
|
||||||
if (sigIRC.configNeedsUpdating>0 &&
|
if (sigIRC.configNeedsUpdating>0 &&
|
||||||
@ -51,6 +60,10 @@ public class ProgramWindow extends JFrame{
|
|||||||
sigIRC.configNeedsUpdating=0;
|
sigIRC.configNeedsUpdating=0;
|
||||||
}
|
}
|
||||||
},1000,1000,TimeUnit.MILLISECONDS);
|
},1000,1000,TimeUnit.MILLISECONDS);
|
||||||
|
scheduler.scheduleWithFixedDelay(()->{
|
||||||
|
lastMouseX = (int)(MouseInfo.getPointerInfo().getLocation().getX());
|
||||||
|
lastMouseY = (int)(MouseInfo.getPointerInfo().getLocation().getY());
|
||||||
|
},(long)((1d/(sigIRC.framerate+1))*1000),(long)((1d/(sigIRC.framerate+1))*1000),TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sigIRC.programIcon = ImageIO.read(sigIRC.class.getResource("/resource/sigIRCicon.png"));
|
sigIRC.programIcon = ImageIO.read(sigIRC.class.getResource("/resource/sigIRCicon.png"));
|
||||||
@ -69,6 +82,7 @@ public class ProgramWindow extends JFrame{
|
|||||||
JFrame.setDefaultLookAndFeelDecorated(true);
|
JFrame.setDefaultLookAndFeelDecorated(true);
|
||||||
}
|
}
|
||||||
System.setProperty("sun.java2d.opengl", Boolean.toString(sigIRC.hardwareAcceleration));
|
System.setProperty("sun.java2d.opengl", Boolean.toString(sigIRC.hardwareAcceleration));
|
||||||
|
System.setProperty("sun.java2d.d3d",Boolean.toString(true));
|
||||||
JFrame f = new JFrame("sigIRCv2");
|
JFrame f = new JFrame("sigIRCv2");
|
||||||
this.setAutoRequestFocus(true);
|
this.setAutoRequestFocus(true);
|
||||||
this.toFront();
|
this.toFront();
|
||||||
@ -93,28 +107,29 @@ public class ProgramWindow extends JFrame{
|
|||||||
|
|
||||||
if (!sigIRC.disableChatMessages) {
|
if (!sigIRC.disableChatMessages) {
|
||||||
ScrollingChatModule mod = new ScrollingChatModule(new Rectangle((int)sigIRC.scrollingchatmodule_X,(int)sigIRC.scrollingchatmodule_Y,(int)sigIRC.scrollingchatmodule_width,(int)sigIRC.scrollingchatmodule_height),"Scrolling Chat");
|
ScrollingChatModule mod = new ScrollingChatModule(new Rectangle((int)sigIRC.scrollingchatmodule_X,(int)sigIRC.scrollingchatmodule_Y,(int)sigIRC.scrollingchatmodule_width,(int)sigIRC.scrollingchatmodule_height),"Scrolling Chat");
|
||||||
ModuleButton button = new ModuleButton("Scrolling Chat",mod);
|
ModuleSelectButton button = new ModuleSelectButton("Scrolling Chat",mod);
|
||||||
sigIRC.panel.add(button);
|
sigIRC.panel.add(button);
|
||||||
}
|
}
|
||||||
if (sigIRC.chatlogmodule_enabled) {
|
if (sigIRC.chatlogmodule_enabled) {
|
||||||
ChatLogModule mod = new ChatLogModule(new Rectangle(sigIRC.chatlogmodule_X,sigIRC.chatlogmodule_Y,sigIRC.chatlogmodule_width,sigIRC.chatlogmodule_height),"Chat Log");
|
ChatLogModule mod = new ChatLogModule(new Rectangle(sigIRC.chatlogmodule_X,sigIRC.chatlogmodule_Y,sigIRC.chatlogmodule_width,sigIRC.chatlogmodule_height),"Chat Log");
|
||||||
ModuleButton button = new ModuleButton("Chat Log",mod);
|
ModuleSelectButton button = new ModuleSelectButton("Chat Log",mod);
|
||||||
sigIRC.panel.add(button);
|
sigIRC.panel.add(button);
|
||||||
}
|
}
|
||||||
if (sigIRC.controllermodule_enabled) {
|
if (sigIRC.controllermodule_enabled) {
|
||||||
ModuleButton button = new ModuleButton("Controller",new Module(new Rectangle(0,0,0,0),"Test"));
|
ModuleSelectButton button = new ModuleSelectButton("Controller",new Module(new Rectangle(0,0,0,0),"Test"));
|
||||||
sigIRC.panel.add(button);
|
sigIRC.panel.add(button);
|
||||||
}
|
}
|
||||||
if (sigIRC.twitchmodule_enabled) {
|
if (sigIRC.twitchmodule_enabled) {
|
||||||
ModuleButton button = new ModuleButton("Twitch",new Module(new Rectangle(0,0,0,0),"Test"));
|
ModuleSelectButton button = new ModuleSelectButton("Twitch",new Module(new Rectangle(0,0,0,0),"Test"));
|
||||||
sigIRC.panel.add(button);
|
sigIRC.panel.add(button);
|
||||||
}
|
}
|
||||||
if (sigIRC.rabiracemodule_enabled) {
|
if (sigIRC.rabiracemodule_enabled) {
|
||||||
ModuleButton button = new ModuleButton("Rabi-Race",new Module(new Rectangle(0,0,0,0),"Test"));
|
RabiRaceModule mod = new RabiRaceModule(new Rectangle((int)sigIRC.rabiracemodule_X,(int)sigIRC.rabiracemodule_Y,(int)sigIRC.rabiracemodule_width,(int)sigIRC.rabiracemodule_height),"Rabi Race");
|
||||||
|
ModuleSelectButton button = new ModuleSelectButton("Rabi-Race",mod);
|
||||||
sigIRC.panel.add(button);
|
sigIRC.panel.add(button);
|
||||||
}
|
}
|
||||||
if (sigIRC.touhoumothermodule_enabled) {
|
if (sigIRC.touhoumothermodule_enabled) {
|
||||||
ModuleButton button = new ModuleButton("Touhou Mother",new Module(new Rectangle(0,0,0,0),"Test"));
|
ModuleSelectButton button = new ModuleSelectButton("Touhou Mother",new Module(new Rectangle(0,0,0,0),"Test"));
|
||||||
sigIRC.panel.add(button);
|
sigIRC.panel.add(button);
|
||||||
}
|
}
|
||||||
GridLayout myLayout = new GridLayout(0,1);
|
GridLayout myLayout = new GridLayout(0,1);
|
||||||
@ -133,7 +148,8 @@ public class ProgramWindow extends JFrame{
|
|||||||
//this.add(colorpanel);
|
//this.add(colorpanel);
|
||||||
this.setLocationByPlatform(true);
|
this.setLocationByPlatform(true);
|
||||||
this.add(sigIRC.panel);
|
this.add(sigIRC.panel);
|
||||||
this.pack();
|
//this.pack();
|
||||||
|
this.setSize(240, 640);
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
//this.setLocation(sigIRC.windowX, sigIRC.windowY);
|
//this.setLocation(sigIRC.windowX, sigIRC.windowY);
|
||||||
//this.setSize(sigIRC.windowWidth, sigIRC.windowHeight);
|
//this.setSize(sigIRC.windowWidth, sigIRC.windowHeight);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user