mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Move several confirm popups to prompt pane - required modifying prompt pane to have a cardview instead of a spellabilityview
This commit is contained in:
@@ -792,8 +792,8 @@ public final class CMatchUI
|
||||
cPrompt.setMessage(message);
|
||||
}
|
||||
// no override for now
|
||||
public void showPromptMessage(final PlayerView playerView, final String message, final SpellAbilityView sav ) {
|
||||
cPrompt.setMessage(message,sav);
|
||||
public void showPromptMessage(final PlayerView playerView, final String message, final CardView card ) {
|
||||
cPrompt.setMessage(message,card);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,7 +29,6 @@ import javax.swing.JButton;
|
||||
import forge.FThreads;
|
||||
import forge.game.GameView;
|
||||
import forge.game.card.CardView;
|
||||
import forge.game.spellability.SpellAbilityView;
|
||||
import forge.gui.framework.ICDoc;
|
||||
import forge.gui.framework.SDisplayUtil;
|
||||
import forge.screens.match.CMatchUI;
|
||||
@@ -105,11 +104,11 @@ public class CPrompt implements ICDoc {
|
||||
|
||||
public void setMessage(final String s0) {
|
||||
view.getTarMessage().setText(FSkin.encodeSymbols(s0, false));
|
||||
view.setSpellAbilityView(null);
|
||||
view.setCardView(null);
|
||||
}
|
||||
public void setMessage(final String s0, final SpellAbilityView sav) {
|
||||
public void setMessage(final String s0, final CardView card) {
|
||||
view.getTarMessage().setText(FSkin.encodeSymbols(s0, false));
|
||||
view.setSpellAbilityView(sav);
|
||||
view.setCardView(card);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
package forge.screens.match.views;
|
||||
|
||||
import forge.game.card.CardView;
|
||||
import forge.game.spellability.SpellAbilityView;
|
||||
import forge.gui.framework.DragCell;
|
||||
import forge.gui.framework.DragTab;
|
||||
import forge.gui.framework.EDocID;
|
||||
@@ -56,10 +55,10 @@ public class VPrompt implements IVDoc<CPrompt> {
|
||||
private final FScrollPane messageScroller = new FScrollPane(tarMessage, false,
|
||||
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
private final JLabel lblGames;
|
||||
private SpellAbilityView sav = null ;
|
||||
private CardView card = null ;
|
||||
|
||||
public void setSpellAbilityView(final SpellAbilityView sav) {
|
||||
this.sav = sav ;
|
||||
public void setCardView(final CardView card) {
|
||||
this.card = card ;
|
||||
}
|
||||
|
||||
private KeyAdapter buttonKeyAdapter = new KeyAdapter() {
|
||||
@@ -97,8 +96,8 @@ public class VPrompt implements IVDoc<CPrompt> {
|
||||
messageScroller.getViewport().getView().addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseEntered(final MouseEvent e) {
|
||||
if ( sav != null ) {
|
||||
controller.getMatchUI().setCard(sav.getHostCard());
|
||||
if ( card != null ) {
|
||||
controller.getMatchUI().setCard(card);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user