mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[PIP] Implement Rad Counters mechanic (#12087)
This commit is contained in:
parent
11373fd75d
commit
9d7bf27d38
14 changed files with 420 additions and 176 deletions
|
|
@ -1,6 +1,5 @@
|
|||
package mage.client.game;
|
||||
|
||||
import mage.cards.decks.importer.DckDeckImporter;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.SessionHandler;
|
||||
import mage.client.cards.BigCard;
|
||||
|
|
@ -8,7 +7,6 @@ import mage.client.components.HoverButton;
|
|||
import mage.client.components.MageRoundPane;
|
||||
import mage.client.components.ext.dlg.DialogManager;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.client.themes.ThemeType;
|
||||
import mage.client.util.CardsViewUtil;
|
||||
import mage.client.util.ImageHelper;
|
||||
import mage.client.util.gui.BufferedImageBuilder;
|
||||
|
|
@ -16,6 +14,7 @@ import mage.client.util.gui.countryBox.CountryUtil;
|
|||
import mage.components.ImagePanel;
|
||||
import mage.components.ImagePanelStyle;
|
||||
import mage.constants.CardType;
|
||||
import static mage.constants.Constants.*;
|
||||
import mage.constants.ManaType;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
|
|
@ -33,12 +32,10 @@ import java.awt.*;
|
|||
import java.awt.image.BufferedImage;
|
||||
import java.util.*;
|
||||
|
||||
import static mage.constants.Constants.*;
|
||||
|
||||
/**
|
||||
* Game GUI: player panel with avatar and icons
|
||||
*
|
||||
* @author nantuko, JayDi85
|
||||
* @author nantuko, JayDi85, Susucr
|
||||
*/
|
||||
public class PlayerPanelExt extends javax.swing.JPanel {
|
||||
|
||||
|
|
@ -53,8 +50,8 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
private static final String DEFAULT_AVATAR_PATH = "/avatars/" + DEFAULT_AVATAR_ID + ".jpg";
|
||||
|
||||
private static final int PANEL_WIDTH = 94;
|
||||
private static final int PANEL_HEIGHT = 262;
|
||||
private static final int PANEL_HEIGHT_SMALL = 210;
|
||||
private static final int PANEL_HEIGHT = 290;
|
||||
private static final int PANEL_HEIGHT_SMALL = 238;
|
||||
private static final int PANEL_HEIGHT_EXTRA_FOR_ME = 25;
|
||||
private static final int MANA_LABEL_SIZE_HORIZONTAL = 20;
|
||||
|
||||
|
|
@ -232,6 +229,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
setTextForLabel("poison", poisonLabel, poison, player.getCounters().getCount(CounterType.POISON), false);
|
||||
setTextForLabel("energy", energyLabel, energy, player.getCounters().getCount(CounterType.ENERGY), false);
|
||||
setTextForLabel("experience", experienceLabel, experience, player.getCounters().getCount(CounterType.EXPERIENCE), false);
|
||||
setTextForLabel("rad", radLabel, rad, player.getCounters().getCount(CounterType.RAD), false);
|
||||
setTextForLabel("hand zone", handLabel, hand, player.getHandCount(), true);
|
||||
int libraryCards = player.getLibraryCount();
|
||||
if (libraryCards > 99) {
|
||||
|
|
@ -493,6 +491,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
poisonLabel = new JLabel();
|
||||
energyLabel = new JLabel();
|
||||
experienceLabel = new JLabel();
|
||||
radLabel = new JLabel();
|
||||
graveLabel = new JLabel();
|
||||
commandLabel = new JLabel();
|
||||
libraryLabel = new JLabel();
|
||||
|
|
@ -523,14 +522,17 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
// life area
|
||||
r = new Rectangle(18, 18);
|
||||
lifeLabel.setToolTipText("Life");
|
||||
lifeLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
Image imageLife = ImageHelper.getImageFromResources("/info/life.png");
|
||||
BufferedImage resizedLife = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageLife, BufferedImage.TYPE_INT_ARGB), r);
|
||||
life = new ImagePanel(resizedLife, ImagePanelStyle.ACTUAL);
|
||||
life.setToolTipText("Life");
|
||||
life.setOpaque(false);
|
||||
|
||||
// hand area
|
||||
r = new Rectangle(18, 18);
|
||||
handLabel.setToolTipText("Hand");
|
||||
handLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
Image imageHand = ImageHelper.getImageFromResources("/info/hand.png");
|
||||
BufferedImage resizedHand = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageHand, BufferedImage.TYPE_INT_ARGB), r);
|
||||
hand = new ImagePanel(resizedHand, ImagePanelStyle.ACTUAL);
|
||||
|
|
@ -544,10 +546,12 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
poison = new ImagePanel(resizedPoison, ImagePanelStyle.ACTUAL);
|
||||
poison.setOpaque(false);
|
||||
setTextForLabel("poison", poisonLabel, poison, 0, false);
|
||||
poisonLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
|
||||
// Library
|
||||
r = new Rectangle(19, 19);
|
||||
libraryLabel.setToolTipText("Library");
|
||||
libraryLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
Image imageLibrary = ImageHelper.getImageFromResources("/info/library.png");
|
||||
BufferedImage resizedLibrary = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageLibrary, BufferedImage.TYPE_INT_ARGB), r);
|
||||
|
||||
|
|
@ -559,6 +563,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
// Grave count and open graveyard button
|
||||
r = new Rectangle(21, 21);
|
||||
graveLabel.setToolTipText("Card Types: 0");
|
||||
graveLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
Image imageGrave = ImageHelper.getImageFromResources("/info/grave.png");
|
||||
BufferedImage resizedGrave = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageGrave, BufferedImage.TYPE_INT_ARGB), r);
|
||||
|
||||
|
|
@ -569,6 +574,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
|
||||
exileLabel = new JLabel();
|
||||
exileLabel.setToolTipText("Exile");
|
||||
exileLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
image = ImageHelper.getImageFromResources("/info/exile.png");
|
||||
r = new Rectangle(21, 21);
|
||||
resized = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB), r);
|
||||
|
|
@ -619,12 +625,6 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
toolHintsHelper.setBounds(3, 2 + 21 + 2, 73, 21);
|
||||
zonesPanel.add(toolHintsHelper);
|
||||
|
||||
energyExperiencePanel = new JPanel();
|
||||
energyExperiencePanel.setPreferredSize(new Dimension(100, 20));
|
||||
energyExperiencePanel.setSize(100, 20);
|
||||
energyExperiencePanel.setLayout(null);
|
||||
energyExperiencePanel.setOpaque(false);
|
||||
|
||||
// Energy count
|
||||
r = new Rectangle(18, 18);
|
||||
Image imageEnergy = ImageHelper.getImageFromResources("/info/energy.png");
|
||||
|
|
@ -633,6 +633,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
energy.setToolTipText("Energy");
|
||||
energy.setOpaque(false);
|
||||
setTextForLabel("energy", energyLabel, energy, 0, false);
|
||||
energyLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
|
||||
// Experience count
|
||||
r = new Rectangle(18, 18);
|
||||
|
|
@ -642,6 +643,17 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
experience.setToolTipText("Experience");
|
||||
experience.setOpaque(false);
|
||||
setTextForLabel("experience", experienceLabel, experience, 0, false);
|
||||
experienceLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
|
||||
// Rad count
|
||||
r = new Rectangle(16, 16);
|
||||
Image imageRad = ImageHelper.getImageFromResources("/info/rad.png");
|
||||
BufferedImage resizedRad = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageRad, BufferedImage.TYPE_INT_ARGB), r);
|
||||
rad = new ImagePanel(resizedRad, ImagePanelStyle.ACTUAL);
|
||||
rad.setToolTipText("Rad");
|
||||
rad.setOpaque(false);
|
||||
setTextForLabel("rad", radLabel, rad, 0, false);
|
||||
radLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
|
||||
btnPlayer = new JButton();
|
||||
btnPlayer.setText("Player");
|
||||
|
|
@ -672,6 +684,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
//*/
|
||||
///*
|
||||
JLabel manaCountLabelW = new JLabel();
|
||||
manaCountLabelW.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
manaLabels.put(manaCountLabelW, ManaType.WHITE);
|
||||
r = new Rectangle(15, 15);
|
||||
BufferedImage imageManaW = ManaSymbols.getSizedManaSymbol("W", 15);
|
||||
|
|
@ -684,6 +697,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
|
||||
JLabel manaCountLabelU = new JLabel();
|
||||
manaLabels.put(manaCountLabelU, ManaType.BLUE);
|
||||
manaCountLabelU.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
r = new Rectangle(15, 15);
|
||||
BufferedImage imageManaU = ManaSymbols.getSizedManaSymbol("U", 15);
|
||||
HoverButton btnBlueMana = new HoverButton(null, imageManaU, imageManaU, imageManaU, r);
|
||||
|
|
@ -694,6 +708,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
|
||||
JLabel manaCountLabelB = new JLabel();
|
||||
manaLabels.put(manaCountLabelB, ManaType.BLACK);
|
||||
manaCountLabelB.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
r = new Rectangle(15, 15);
|
||||
BufferedImage imageManaB = ManaSymbols.getSizedManaSymbol("B", 15);
|
||||
HoverButton btnBlackMana = new HoverButton(null, imageManaB, imageManaB, imageManaB, r);
|
||||
|
|
@ -704,6 +719,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
|
||||
JLabel manaCountLabelR = new JLabel();
|
||||
manaLabels.put(manaCountLabelR, ManaType.RED);
|
||||
manaCountLabelR.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
r = new Rectangle(15, 15);
|
||||
BufferedImage imageManaR = ManaSymbols.getSizedManaSymbol("R", 15);
|
||||
HoverButton btnRedMana = new HoverButton(null, imageManaR, imageManaR, imageManaR, r);
|
||||
|
|
@ -714,6 +730,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
|
||||
JLabel manaCountLabelG = new JLabel();
|
||||
manaLabels.put(manaCountLabelG, ManaType.GREEN);
|
||||
manaCountLabelG.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
r = new Rectangle(15, 15);
|
||||
BufferedImage imageManaG = ManaSymbols.getSizedManaSymbol("G", 15);
|
||||
HoverButton btnGreenMana = new HoverButton(null, imageManaG, imageManaG, imageManaG, r);
|
||||
|
|
@ -724,6 +741,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
|
||||
JLabel manaCountLabelX = new JLabel();
|
||||
manaLabels.put(manaCountLabelX, ManaType.COLORLESS);
|
||||
manaCountLabelX.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
r = new Rectangle(15, 15);
|
||||
BufferedImage imageManaX = ManaSymbols.getSizedManaSymbol("C", 15);
|
||||
HoverButton btnColorlessMana = new HoverButton(null, imageManaX, imageManaX, imageManaX, r);
|
||||
|
|
@ -735,90 +753,6 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
GroupLayout gl_panelBackground = new GroupLayout(panelBackground);
|
||||
gl_panelBackground.setHorizontalGroup(
|
||||
gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(9)
|
||||
.addComponent(life, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(3)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(hand, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lifeLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(4)
|
||||
.addComponent(handLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(9)
|
||||
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(3)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(library, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(poisonLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(4)
|
||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(9)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(energy, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnWhiteMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnBlueMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnBlackMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
|
||||
)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(experience, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(energyLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(20)
|
||||
.addComponent(btnRedMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(manaCountLabelW, GroupLayout.PREFERRED_SIZE, MANA_LABEL_SIZE_HORIZONTAL, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(3)
|
||||
.addComponent(manaCountLabelR, GroupLayout.PREFERRED_SIZE, MANA_LABEL_SIZE_HORIZONTAL, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addComponent(manaCountLabelB, GroupLayout.PREFERRED_SIZE, MANA_LABEL_SIZE_HORIZONTAL, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(19)
|
||||
.addComponent(btnColorlessMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(5)
|
||||
.addComponent(manaCountLabelX, GroupLayout.PREFERRED_SIZE, MANA_LABEL_SIZE_HORIZONTAL, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(20)
|
||||
.addComponent(btnGreenMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(40)
|
||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, MANA_LABEL_SIZE_HORIZONTAL, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(40)
|
||||
.addComponent(experienceLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(18)
|
||||
.addComponent(exileZone, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
|
||||
)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(5)
|
||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(40)
|
||||
.addComponent(exileLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, MANA_LABEL_SIZE_HORIZONTAL, GroupLayout.PREFERRED_SIZE))))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(6)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
|
|
@ -826,11 +760,68 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
.addComponent(timerLabel, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(avatar, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))
|
||||
.addGap(8))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(9)
|
||||
// The left column of icon+label
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(life, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lifeLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(poisonLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(energy, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(energyLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(rad, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(radLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnWhiteMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(manaCountLabelW, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnBlueMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnBlackMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(manaCountLabelB, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)))
|
||||
// The right column of icon+label
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(hand, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(handLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(library, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(experience, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(experienceLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnRedMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(manaCountLabelR, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnGreenMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(btnColorlessMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(manaCountLabelX, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addComponent(exileZone, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(exileLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(4))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(6)
|
||||
.addComponent(zonesPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(14))
|
||||
);
|
||||
.addGap(6)));
|
||||
gl_panelBackground.setVerticalGroup(
|
||||
gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
|
|
@ -845,85 +836,77 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(life, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lifeLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(hand, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lifeLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(handLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
// Poison & Library
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(poison, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(poisonLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(library, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(poisonLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(1)
|
||||
// Poison
|
||||
// Energy & Experience
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(2)
|
||||
.addComponent(energy, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(2)
|
||||
.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(3)
|
||||
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
|
||||
)
|
||||
.addGap(1)
|
||||
.addComponent(energy, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(energyLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(experience, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(energyLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(2)
|
||||
.addComponent(btnRedMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(14)
|
||||
.addComponent(manaCountLabelW, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(14)
|
||||
.addComponent(manaCountLabelR, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(4)
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addComponent(manaCountLabelB, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(8)
|
||||
.addComponent(btnColorlessMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelX, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(1)
|
||||
.addComponent(experience, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(experienceLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
// Rad & <empty>
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(39)
|
||||
.addGap(1)
|
||||
.addComponent(rad, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(radLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
// W & R
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(btnWhiteMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelW, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(btnRedMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelR, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE))
|
||||
// U & G
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(btnBlueMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(1)
|
||||
.addComponent(btnGreenMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE))
|
||||
// B & X
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(31)
|
||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(experienceLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1)
|
||||
.addComponent(btnBlackMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelB, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(76)
|
||||
.addComponent(exileZone, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
|
||||
)
|
||||
.addGap(1)
|
||||
.addComponent(btnColorlessMana, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(manaCountLabelX, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE))
|
||||
// grave & exile
|
||||
.addGroup(gl_panelBackground.createParallelGroup(Alignment.LEADING)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(76)
|
||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(grave, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(76)
|
||||
.addComponent(exileLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||
.addGap(31)
|
||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
|
||||
)
|
||||
)
|
||||
.addComponent(exileZone, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(exileLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(2)
|
||||
.addComponent(zonesPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
|
||||
)
|
||||
);
|
||||
.addComponent(zonesPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)));
|
||||
panelBackground.setLayout(gl_panelBackground);
|
||||
GroupLayout groupLayout = new GroupLayout(this);
|
||||
groupLayout.setHorizontalGroup(
|
||||
|
|
@ -1013,6 +996,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
private ImagePanel poison;
|
||||
private ImagePanel energy;
|
||||
private ImagePanel experience;
|
||||
private ImagePanel rad;
|
||||
private ImagePanel hand;
|
||||
private HoverButton grave;
|
||||
private HoverButton library;
|
||||
|
|
@ -1027,12 +1011,12 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
private JLabel poisonLabel;
|
||||
private JLabel energyLabel;
|
||||
private JLabel experienceLabel;
|
||||
private JLabel radLabel;
|
||||
private JLabel graveLabel;
|
||||
private JLabel commandLabel;
|
||||
private JLabel exileLabel;
|
||||
|
||||
private JPanel zonesPanel;
|
||||
private JPanel energyExperiencePanel;
|
||||
private HoverButton exileZone;
|
||||
private HoverButton commandZone;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue