Fixed arrows displayed under dialogs. Since now card.plugin is used in ShowCardsDialog. Added sourceCard to AbilityView (required for source arrows).

This commit is contained in:
magenoxx 2010-11-28 21:10:31 +00:00
parent be707b3b52
commit 0211787433
7 changed files with 56 additions and 22 deletions

View file

@ -164,12 +164,16 @@ public class MageFrame extends javax.swing.JFrame {
e.printStackTrace();
}
desktopPane.add(ArrowBuilder.getArrowsPanel(), JLayeredPane.DRAG_LAYER);
desktopPane.addComponentListener(new ComponentAdapter(){
@Override
public void componentResized(ComponentEvent e) {
int width = ((JComponent)e.getSource()).getWidth();
int height = ((JComponent)e.getSource()).getHeight();
backgroundPane.setSize(width, height);
JPanel arrowsPanel = ArrowBuilder.getArrowsPanelRef();
if (arrowsPanel != null) arrowsPanel.setSize(width, height);
}
});