/* */ package NET.worlds.scape; /* */ /* */ import NET.worlds.console.Console; /* */ import NET.worlds.console.ImageButtons; /* */ import NET.worlds.console.ImageButtonsCallback; /* */ import java.awt.Color; /* */ import java.awt.Font; /* */ import java.awt.FontMetrics; /* */ import java.awt.Graphics; /* */ import java.awt.Rectangle; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ class ChangeAvatarImageButtons /* */ extends ImageButtons /* */ { /* */ private static final long serialVersionUID = 1L; /* */ private static final int textBoxW = 177; /* */ private static final int textBoxH = 23; /* 87 */ private static Font font = new Font( /* 88 */ Console.message("AvatarFont"), 0, 12); /* */ /* */ private static int textWidth; /* */ /* */ private static int textX; /* */ private static int textY; /* */ private String text; /* */ /* */ public ChangeAvatarImageButtons(String texture, Rectangle[] rects, ImageButtonsCallback cb, String text) /* */ { /* 98 */ super(texture, rects, cb); /* 99 */ this.text = text; /* */ } /* */ /* */ public void paint(Graphics g) /* */ { /* 104 */ super.paint(g); /* 105 */ g.setFont(font); /* 106 */ g.setColor(Color.white); /* 107 */ if (textWidth == 0) { /* 108 */ FontMetrics fm = g.getFontMetrics(); /* 109 */ textWidth = fm.stringWidth(this.text); /* 110 */ textX = (177 - textWidth) / 2; /* 111 */ textY = 23 - (23 - fm.getAscent()) / 2; /* */ } /* 113 */ g.drawString(this.text, textX, textY); /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ChangeAvatarImageButtons.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */