Player Panel UI redesign (new icons, new colors, new buttons)

This commit is contained in:
Get 2016-09-18 17:10:54 +03:00
parent 877c4ffa61
commit ed7378da66
21 changed files with 17 additions and 18 deletions

View file

@ -27,7 +27,7 @@ public class MageRoundPane extends JPanel {
private int X_OFFSET = 30;
private int Y_OFFSET = 30;
private final Color defaultBackgroundColor = new Color(255, 255, 255, 200);
private final Color defaultBackgroundColor = new Color(141, 130, 112, 200);
private Color backgroundColor = defaultBackgroundColor;
private final int alpha = 0;
private static Map<ShadowKey, BufferedImage> SHADOW_IMAGE_CACHE;

View file

@ -916,33 +916,33 @@ public final class GamePanel extends javax.swing.JPanel {
private void updateSkipButtons(boolean turn, boolean endOfTurn, boolean nextMain, boolean allTurns, boolean stack, boolean endStepBeforeYourStep) {
if (turn) { //F4
btnSkipToNextTurn.setBorder(new LineBorder(Color.red, BORDER_SIZE));
btnSkipToNextTurn.setBorder(new LineBorder(Color.orange, BORDER_SIZE));
} else {
btnSkipToNextTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE));
}
if (endOfTurn) { // F5
btnSkipToEndTurn.setBorder(new LineBorder(Color.red, BORDER_SIZE));
btnSkipToEndTurn.setBorder(new LineBorder(Color.orange, BORDER_SIZE));
} else {
btnSkipToEndTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE));
}
if (nextMain) { // F7
btnSkipToNextMain.setBorder(new LineBorder(Color.red, BORDER_SIZE));
btnSkipToNextMain.setBorder(new LineBorder(Color.orange, BORDER_SIZE));
} else {
btnSkipToNextMain.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE));
}
if (stack) { // F8
btnSkipStack.setBorder(new LineBorder(Color.red, BORDER_SIZE));
btnSkipStack.setBorder(new LineBorder(Color.orange, BORDER_SIZE));
} else {
btnSkipStack.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE));
}
if (allTurns) { // F9
btnSkipToYourTurn.setBorder(new LineBorder(Color.red, BORDER_SIZE));
btnSkipToYourTurn.setBorder(new LineBorder(Color.orange, BORDER_SIZE));
} else {
btnSkipToYourTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE));
}
if (endStepBeforeYourStep) { // F11
btnSkipToEndStepBeforeYourTurn.setBorder(new LineBorder(Color.red, BORDER_SIZE));
btnSkipToEndStepBeforeYourTurn.setBorder(new LineBorder(Color.orange, BORDER_SIZE));
} else {
btnSkipToEndStepBeforeYourTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE));
}

View file

@ -110,11 +110,11 @@ public class PlayerPanelExt extends javax.swing.JPanel {
private static final int PANEL_HEIGHT_SMALL = 212;
private static final int MANA_LABEL_SIZE_HORIZONTAL = 20;
private static final Border GREEN_BORDER = new LineBorder(Color.green, 3);
private static final Border GREEN_BORDER = new LineBorder(Color.white, 3);
private static final Border RED_BORDER = new LineBorder(Color.red, 2);
private static final Border EMPTY_BORDER = BorderFactory.createEmptyBorder(0, 0, 0, 0);
private final Color greenBackgroundColor = new Color(180, 255, 180, 200);
private final Color deadBackgroundColor = new Color(200, 180, 180, 200);
private final Color greenBackgroundColor = new Color(206, 192, 174, 200);
private final Color deadBackgroundColor = new Color(131, 94, 83, 200);
private int avatarId = -1;
private String flagName;
@ -430,7 +430,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
// Poison count
poisonLabel.setText("0");
r = new Rectangle(14, 14);
r = new Rectangle(18, 18);
poisonLabel.setToolTipText("Poison");
Image imagePoison = ImageHelper.getImageFromResources("/info/poison.png");
BufferedImage resizedPoison = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imagePoison, BufferedImage.TYPE_INT_ARGB), r);
@ -650,8 +650,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
.addGap(9)
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panelBackground.createSequentialGroup()
.addGap(3)
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE))
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_panelBackground.createSequentialGroup()
.addGap(2)
.addComponent(btnWhiteMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
@ -720,7 +719,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
.addComponent(avatar, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))
// .addGroup(gl_panelBackground.createSequentialGroup()
// .addComponent(avatarFlag, GroupLayout.PREFERRED_SIZE, 16, GroupLayout.PREFERRED_SIZE))
.addGap(14))
.addGap(8))
.addGroup(gl_panelBackground.createSequentialGroup()
.addGap(6)
.addComponent(zonesPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
@ -734,7 +733,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btnPlayer)
.addComponent(timerLabel)
.addGap(1)
.addGap(2)
// Life & Hand
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panelBackground.createSequentialGroup()
@ -749,15 +748,15 @@ public class PlayerPanelExt extends javax.swing.JPanel {
// Poison
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panelBackground.createSequentialGroup()
.addGap(4)
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
.addGap(2)
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
.addGap(4)
.addComponent(btnWhiteMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
.addGap(2)
.addComponent(btnBlueMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
.addGap(2)
.addComponent(btnBlackMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
.addGap(5)
.addGap(3)
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
)
.addGroup(gl_panelBackground.createSequentialGroup()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 21 KiB