mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Fix targeting arrows not appearing for stack items in "On Mouse Over" targeting overlay mode.
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user