mirror of
https://github.com/correl/mage.git
synced 2024-11-21 19:18:40 +00:00
GUI: fixed that dungeon card hint doesn't hide after choose dialog, fixed working card hint on empty space in choose dialog (#8012);
This commit is contained in:
parent
1809fb516a
commit
8bd1a9cde5
1 changed files with 10 additions and 2 deletions
|
@ -153,7 +153,14 @@ public class PickChoiceDialog extends MageDialog {
|
|||
public void mouseMoved(MouseEvent e) {
|
||||
// hint show
|
||||
JList listSource = (JList) e.getSource();
|
||||
int index = listSource.locationToIndex(e.getPoint());
|
||||
|
||||
// workaround to raise on real element, not empty space
|
||||
int index = -1;
|
||||
Rectangle r = listSource.getCellBounds(0, listSource.getLastVisibleIndex());
|
||||
if (r != null && r.contains(e.getPoint())) {
|
||||
index = listSource.locationToIndex(e.getPoint());
|
||||
}
|
||||
|
||||
if (index > -1) {
|
||||
choiceHintShow(index);
|
||||
} else {
|
||||
|
@ -255,7 +262,8 @@ public class PickChoiceDialog extends MageDialog {
|
|||
|
||||
private void choiceHintHide() {
|
||||
switch (choice.getHintType()) {
|
||||
case CARD: {
|
||||
case CARD:
|
||||
case CARD_DUNGEON: {
|
||||
// as popup card
|
||||
cardInfo.onMouseExited();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue