Minor updates. Text is white instead of black. Changed Base Directory to

be based on folder it's running from instead of an absolute path.
dev
sigonasr2 8 years ago
parent adcaee4de0
commit aaa19e9cc9
  1. 2
      src/sig/modules/TouhouMother/Button.java
  2. 14
      src/sig/modules/TouhouMotherModule.java
  3. 2
      src/sig/sigIRC.java

@ -38,7 +38,7 @@ public class Button {
}
public void draw(Graphics g) {
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.BLACK, Color.WHITE,
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]);
g.drawImage(buttonimg, x, y, sigIRC.panel);
}

@ -108,7 +108,7 @@ public class TouhouMotherModule extends Module implements ActionListener{
if (currentBoss!=null) {
DrawBossAndPlayerInfo(g);
} else {
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, (int)bounds.getX()+4, (int)bounds.getY()+4+16, 1, Color.BLACK, Color.WHITE,
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, (int)bounds.getX()+4, (int)bounds.getY()+4+16, 1, Color.WHITE, new Color(30,0,86,255),
DataProperty.getDataPropertyBasedOnID(data_display_id).getDisplayName());
DrawSortedHealthbarsBasedOnDataProperty(g, DataProperty.getDataPropertyBasedOnID(data_display_id), 0, -64);
}
@ -119,9 +119,9 @@ public class TouhouMotherModule extends Module implements ActionListener{
public void DrawBossAndPlayerInfo(Graphics g) {
g.drawImage(bossImage, (int)bounds.getX()+4, (int)bounds.getY()+4, sigIRC.panel);
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, Math.min(bossImage.getWidth()+4,160)+(int)bounds.getX()+4, (int)bounds.getY()+4+16, 1, Color.BLACK, Color.WHITE,
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, Math.min(bossImage.getWidth()+4,160)+(int)bounds.getX()+4, (int)bounds.getY()+4+16, 1, Color.WHITE, new Color(30,0,86,255),
currentBoss.getName());
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, Math.min(bossImage.getWidth()+4,160)+(int)bounds.getX()+4, (int)bounds.getY()+4+48, 1, Color.BLACK, Color.WHITE,
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, Math.min(bossImage.getWidth()+4,160)+(int)bounds.getX()+4, (int)bounds.getY()+4+48, 1, Color.WHITE, new Color(30,0,86,255),
real_bossHP+" / "+bossMaxHP +" ("+Math.round(((real_bossHP/(double)bossMaxHP)*100))+"%)");
DrawUtils.drawHealthbar(g, new Rectangle(
Math.min(bossImage.getWidth()+4,160)+(int)bounds.getX()+4,
@ -129,13 +129,13 @@ public class TouhouMotherModule extends Module implements ActionListener{
(int)TextUtils.calculateStringBoundsFont(bossMaxHP+" / "+bossMaxHP +" ("+Math.round((1d*100))+"%", sigIRC.panel.userFont).getWidth(),
8
), real_bossHP/(double)bossMaxHP, ChooseHealthbarColor(real_bossHP/(double)bossMaxHP));
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, Math.min(bossImage.getWidth()+4,160)+(int)bounds.getX()+16, (int)bounds.getY()+4+68, 1, Color.BLACK, Color.WHITE,
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, Math.min(bossImage.getWidth()+4,160)+(int)bounds.getX()+16, (int)bounds.getY()+4+68, 1, Color.WHITE, new Color(30,0,86,255),
TextUtils.convertSecondsToTimeFormat(secondsCount));
int record = TimeRecord.getRecord(currentBoss.getID());
if (record!=TimeRecord.ERROR_VALUE) {
DrawUtils.drawOutlineText(g, sigIRC.panel.smallFont, Math.min(bossImage.getWidth()+4,160)+(int)bounds.getX()+
TextUtils.calculateStringBoundsFont(TextUtils.convertSecondsToTimeFormat(secondsCount), sigIRC.panel.userFont).getWidth()+20,
(int)bounds.getY()+4+72, 1, Color.BLACK, Color.WHITE,
(int)bounds.getY()+4+72, 1, Color.WHITE, new Color(30,0,86,255),
"RECORD "+TextUtils.convertSecondsToTimeFormat(record));
}
DrawSortedHealthbarsBasedOnDataProperty(g, DataProperty.CURRENTDAMAGE, 0, 0);
@ -148,7 +148,7 @@ public class TouhouMotherModule extends Module implements ActionListener{
int totaldmg = calculateDataPropertyTotal(property);
for (int i=0;i<sorteddmg.length;i++) {
if (sorteddmg[i]!=-1 && characterDatabase[sorteddmg[i]].getDataProperty(property)>0) {
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, Math.min(((bossImage!=null)?bossImage.getWidth():0)+4,160)+(int)bounds.getX()+4-Math.min(50, (bossImage!=null)?bossImage.getWidth():0)+x, (int)bounds.getY()+4+96+pos+y, 1, Color.BLACK, Color.WHITE,
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, Math.min(((bossImage!=null)?bossImage.getWidth():0)+4,160)+(int)bounds.getX()+4-Math.min(50, (bossImage!=null)?bossImage.getWidth():0)+x, (int)bounds.getY()+4+96+pos+y, 1, Color.WHITE, new Color(30,0,86,255),
characterDatabase[sorteddmg[i]].getName());
DrawUtils.drawHealthbar(g,
new Rectangle(
@ -159,7 +159,7 @@ public class TouhouMotherModule extends Module implements ActionListener{
)
, (double)characterDatabase[sorteddmg[i]].getDataProperty(property)/totaldmg, characterDatabase[sorteddmg[i]].getColor());
DecimalFormat df = new DecimalFormat("0.0");
DrawUtils.drawOutlineText(g, sigIRC.panel.smallFont, Math.min((bossImage!=null)?bossImage.getWidth():0+4,160)+(int)bounds.getX()+4+Math.max(0, 50-((bossImage!=null)?bossImage.getWidth():0))+108+x, (int)bounds.getY()+4+96+pos+y, 1, Color.BLACK, Color.WHITE,
DrawUtils.drawOutlineText(g, sigIRC.panel.smallFont, Math.min((bossImage!=null)?bossImage.getWidth():0+4,160)+(int)bounds.getX()+4+Math.max(0, 50-((bossImage!=null)?bossImage.getWidth():0))+108+x, (int)bounds.getY()+4+96+pos+y, 1, Color.WHITE, new Color(30,0,86,255),
characterDatabase[sorteddmg[i]].getDataProperty(property)+" "+"("+df.format(((((double)characterDatabase[sorteddmg[i]].getDataProperty(property)/totaldmg))*100))+"%)");
pos+=16;
}

@ -41,7 +41,7 @@ public class sigIRC{
static Timer programClock = new Timer(32,updater);
final public static int TEXTSCROLLSPD = 4;
final public static int ROWSEPARATION = 64;
final public static String BASEDIR = "D:\\Documents\\Touhou Mother Speedrun\\sigIRC\\";
final public static String BASEDIR = ".\\";
final public static String WINDOWTITLE = "sigIRCv2";
public static void main(String[] args) {

Loading…
Cancel
Save