GUI: fixed not working card popup near screen border, improved card popup for chat and choose dialogs;

This commit is contained in:
Oleg Agafonov 2023-11-25 17:27:59 +04:00
parent 7475ee922a
commit 63290d3ed6
8 changed files with 85 additions and 15 deletions

View file

@ -1,5 +1,6 @@
package mage.client.components;
import mage.cards.action.TransferData;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.client.cards.BigCard;
@ -109,6 +110,7 @@ public class ColorPane extends JEditorPane {
if (cardView != null) {
cardInfo.init(cardView, this.bigCard, this.gameId);
cardInfo.setTooltipDelay(CHAT_TOOLTIP_DELAY_MS);
cardInfo.setPopupAutoLocationMode(TransferData.PopupAutoLocationMode.PUT_NEAR_MOUSE_POSITION);
cardInfo.onMouseEntered(MouseInfo.getPointerInfo().getLocation());
cardInfo.onMouseMoved(MouseInfo.getPointerInfo().getLocation());
}