mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Select card window - Fixed a bug that the window (also if reqiured) was closed, if you clicked on the frame of the window (e.g. to resize). Now the window is not closed in this case and can also be resized (fixes #100). However if the target is not set to required, the window is not modal and clicking anywhere beside the window, will still close the window without having made a selection.
This commit is contained in:
parent
856dd35686
commit
c40dd7fb4b
4 changed files with 23 additions and 10 deletions
|
|
@ -154,7 +154,10 @@ public class ShowCardsDialog extends MageDialog implements MouseListener {
|
|||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
this.hideDialog();
|
||||
// only hide dialog, if a cardPanel was selected
|
||||
if (e.getSource() instanceof CardPanel) {
|
||||
this.hideDialog();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -661,7 +661,17 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
updateGame(gameView);
|
||||
this.feedbackPanel.getFeedback(FeedbackMode.QUESTION, question, false, null, messageId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a pick target dialog and allows the player to pick a target (e.g. the pick triggered ability)
|
||||
*
|
||||
* @param message
|
||||
* @param cardView
|
||||
* @param gameView
|
||||
* @param targets
|
||||
* @param required
|
||||
* @param options
|
||||
* @param messageId
|
||||
*/
|
||||
public void pickTarget(String message, CardsView cardView, GameView gameView, Set<UUID> targets, boolean required, Map<String, Serializable> options, int messageId) {
|
||||
ShowCardsDialog dialog = null;
|
||||
updateGame(gameView);
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ public class CallbackClientImpl implements CallbackClient {
|
|||
panel.ask(message.getMessage(), message.getGameView(), callback.getMessageId());
|
||||
} break;
|
||||
}
|
||||
case "gameTarget":
|
||||
case "gameTarget": // e.g. Pick triggered ability
|
||||
{
|
||||
GameClientMessage message = (GameClientMessage) callback.getData();
|
||||
GamePanel panel = MageFrame.getGame(callback.getObjectId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue