- Fix targeting arrows not appearing for stack items in "On Mouse Over" targeting overlay mode.

This commit is contained in:
Agetian
2014-10-24 06:08:53 +00:00
parent f8444f6559
commit 14db79e126

View File

@@ -103,6 +103,8 @@ public enum TargetingOverlay {
cardPanels.clear(); cardPanels.clear();
cardsVisualized.clear(); cardsVisualized.clear();
StackInstanceTextArea activeStackItem = VStack.SINGLETON_INSTANCE.getHoveredItem();
switch (CDock.SINGLETON_INSTANCE.getArcState()) { switch (CDock.SINGLETON_INSTANCE.getArcState()) {
case 0: case 0:
return; return;
@@ -119,7 +121,7 @@ public enum TargetingOverlay {
} }
} }
} }
if (activePanel == null) { return; } if (activePanel == null && activeStackItem == null) { return; }
break; break;
default: default:
// Draw all // Draw all
@@ -147,7 +149,9 @@ public enum TargetingOverlay {
if (CDock.SINGLETON_INSTANCE.getArcState() == 1) { if (CDock.SINGLETON_INSTANCE.getArcState() == 1) {
// Only work with the active panel // Only work with the active panel
addArcsForCard(activePanel.getCard(), endpoints, combat); if (activePanel != null) {
addArcsForCard(activePanel.getCard(), endpoints, combat);
}
} }
else { else {
// Work with all card panels currently visible // Work with all card panels currently visible
@@ -160,7 +164,6 @@ public enum TargetingOverlay {
} }
//draw arrow connecting active item on stack //draw arrow connecting active item on stack
StackInstanceTextArea activeStackItem = VStack.SINGLETON_INSTANCE.getHoveredItem();
if (activeStackItem != null) { if (activeStackItem != null) {
Point itemLocOnScreen = activeStackItem.getLocationOnScreen(); Point itemLocOnScreen = activeStackItem.getLocationOnScreen();
if (itemLocOnScreen != null) { if (itemLocOnScreen != null) {