forked from External/mage
Merge pull request 'master' (#19) from External/mage:master into master
All checks were successful
/ example-docker-compose (push) Successful in 15m4s
All checks were successful
/ example-docker-compose (push) Successful in 15m4s
Reviewed-on: #19
This commit is contained in:
commit
d1ca46fd85
111 changed files with 3335 additions and 976 deletions
|
|
@ -152,7 +152,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
|
|||
setBackgroundPainter(mwPanelPainter);
|
||||
|
||||
title = new ColorPane();
|
||||
title.setFont(new Font("Times New Roman", 1, sizeMod(15)));
|
||||
title.setFont(new Font("Times New Roman", Font.BOLD, sizeMod(15)));
|
||||
title.setEditable(false);
|
||||
title.setFocusCycleRoot(false);
|
||||
title.setOpaque(false);
|
||||
|
|
@ -186,11 +186,12 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
|
|||
rows.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mousePressed(MouseEvent evt) {
|
||||
if (SwingUtilities.isLeftMouseButton(evt)) {
|
||||
if (SwingUtilities.isLeftMouseButton(evt) && !rows.isSelectionEmpty()) {
|
||||
objectMouseClicked(evt);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
rows.setSelectedIndex(0);
|
||||
rows.setFont(new Font("Times New Roman", 1, sizeMod(17)));
|
||||
rows.setBorder(BorderFactory.createEmptyBorder());
|
||||
|
|
@ -233,18 +234,16 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
|
|||
|
||||
@Override
|
||||
public void mouseWheelMoved(MouseWheelEvent e) {
|
||||
int notches = e.getWheelRotation();
|
||||
int index = rows.getSelectedIndex();
|
||||
|
||||
if (notches < 0) {
|
||||
if (index > 0) {
|
||||
rows.setSelectedIndex(index - 1);
|
||||
rows.repaint();
|
||||
}
|
||||
} else if (index < choices.size() - 1) {
|
||||
rows.setSelectedIndex(index + 1);
|
||||
rows.repaint();
|
||||
int direction = e.getWheelRotation() < 0 ? -1 : +1;
|
||||
int index = rows.getSelectedIndex() + direction;
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
} else if (index >= choices.size()) {
|
||||
index = choices.size() - 1;
|
||||
}
|
||||
|
||||
rows.setSelectedIndex(index);
|
||||
rows.repaint();
|
||||
}
|
||||
|
||||
private void objectMouseClicked(MouseEvent event) {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class DialogContainer extends JPanel {
|
|||
case EMBLEMS: {
|
||||
backgroundColor = new Color(0, 0, 50, 110);
|
||||
alpha = 0;
|
||||
ChoiceDialog dlg = new ChoiceDialog(params, "Command Zone (Commander, Emblems and Planes)");
|
||||
ChoiceDialog dlg = new ChoiceDialog(params, "Command Zone (Commanders, Emblems, and Planes)");
|
||||
add(dlg);
|
||||
dlg.setLocation(X_OFFSET + 10, Y_OFFSET + 10);
|
||||
dlg.updateSize(params.rect.width - 80, params.rect.height - 80);
|
||||
|
|
|
|||
|
|
@ -687,11 +687,11 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
zonesPanel.setLayout(null);
|
||||
zonesPanel.setOpaque(false);
|
||||
|
||||
// tools button like hints
|
||||
// hints
|
||||
toolHintsHelper = new JButton();
|
||||
toolHintsHelper.setFont(this.getFont());
|
||||
toolHintsHelper.setText("hints");
|
||||
toolHintsHelper.setToolTipText("Open new card hints helper window");
|
||||
toolHintsHelper.setText("Hints");
|
||||
toolHintsHelper.setToolTipText("Open card hints helper window");
|
||||
toolHintsHelper.addActionListener(this::btnToolHintsHelperActionPerformed);
|
||||
toolHintsHelper.setBounds(sizeMod(3), sizeMod(2 + 21 + 2), sizeMod(73), sizeMod(21));
|
||||
zonesPanel.add(toolHintsHelper);
|
||||
|
|
@ -701,7 +701,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
image = ImageHelper.getImageFromResources("/info/command_zone.png");
|
||||
resized = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB), r);
|
||||
commandZone = new HoverButton(null, resized, resized, resized, r, this.guiScaleMod);
|
||||
commandZone.setToolTipText("Command Zone (Commanders, Emblems and Planes)");
|
||||
commandZone.setToolTipText("Command Zone (Commanders, Emblems, and Planes)");
|
||||
commandZone.setOpaque(false);
|
||||
commandZone.setObserver(() -> btnCommandZoneActionPerformed(null));
|
||||
commandZone.setBounds(sizeMod(3), 0, sizeMod(21), sizeMod(21));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue