blob: c99ebcf2e9dbd08c2e08996094741134f0dab243 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
/* */ 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
*/
|