New game panel: new player info, centered hand, displaying poison counters, layout fix (Issue 25 fix), avatars, etc.

This commit is contained in:
magenoxx 2011-01-23 14:41:57 +03:00
parent 3710f275db
commit 08a4aa4aea
101 changed files with 571 additions and 117 deletions

View file

@ -168,4 +168,8 @@ public class HoverButton extends JPanel implements MouseListener {
public void changeSelected() {
this.isSelected = !this.isSelected;
}
public void setText(String text) {
this.text = text;
}
}

View file

@ -18,10 +18,10 @@ import javax.swing.JPanel;
*/
public class MageRoundPane extends JPanel {
private static int X_OFFSET = 30;
private static int Y_OFFSET = 30;
private int X_OFFSET = 30;
private int Y_OFFSET = 30;
private BufferedImage shadow = null;
private Color backgroundColor = new Color(255, 255, 255, 220);
private Color backgroundColor = new Color(255, 255, 255, 200);
private int alpha = 0;
@Override
@ -66,6 +66,14 @@ public class MageRoundPane extends JPanel {
g2.dispose();
}
public void setXOffset(int x_offset) {
X_OFFSET = x_offset;
}
public void setYOffset(int y_offset) {
Y_OFFSET = y_offset;
}
@Override
public void setBounds(int x, int y, int width, int height) {
super.setBounds(x, y, width, height);

View file

@ -20,7 +20,7 @@ import java.util.regex.Pattern;
public class ManaSymbols {
private static final Logger log = Logger.getLogger(ManaSymbols.class);
static private final Map<String, Image> manaImages = new HashMap<String, Image>();
static private final Map<String, BufferedImage> manaImages = new HashMap<String, BufferedImage>();
static private final Map<String, Image> manaImagesOriginal = new HashMap<String, Image>();
static private final Map<String, Image> setImages = new HashMap<String, Image>();
static private Pattern replaceSymbolsPattern = Pattern.compile("\\{([^}/]*)/?([^}]*)\\}");
@ -107,6 +107,10 @@ public class ManaSymbols {
return manaImagesOriginal.get(symbol);
}
static public BufferedImage getManaSymbolImageSmall(String symbol) {
return manaImages.get(symbol);
}
static public Image getSetSymbolImage(String set) {
return setImages.get(set);
}