forked from External/mage
Have a faded life total over the avatar which glows then fades again reddish for damage and bluish for life gain.
This commit is contained in:
parent
1466cc2a81
commit
08ffbecdb4
2 changed files with 93 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ public class HoverButton extends JPanel implements MouseListener {
|
|||
private Command onHover = null;
|
||||
private Color textColor = Color.white;
|
||||
private final Rectangle centerTextArea = new Rectangle(5, 18, 75, 40);
|
||||
private final Color centerTextColor = Color.YELLOW;
|
||||
private Color centerTextColor = Color.YELLOW;
|
||||
private final Color textBGColor = Color.black;
|
||||
|
||||
static final Font textFont = new Font("Arial", Font.PLAIN, 12);
|
||||
|
|
@ -174,6 +174,10 @@ public class HoverButton extends JPanel implements MouseListener {
|
|||
g2d.drawString(set, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void setCenterColor(Color c) {
|
||||
centerTextColor = c;
|
||||
}
|
||||
|
||||
private int calculateOffset(Graphics2D g2d) {
|
||||
if (textOffsetX == -1) { // calculate once
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue