mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Prevent crash when selecting cards for cleanup
This commit is contained in:
@@ -256,7 +256,7 @@ public class GuiMobile implements IGuiBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCard(Card card) {
|
public void setCard(Card card) {
|
||||||
FControl.setCard(card);
|
//doesn't need to do anything
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -194,15 +194,6 @@ public class FControl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setCard(final Card c) {
|
|
||||||
FThreads.assertExecutedByEdt(true);
|
|
||||||
setCard(c, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setCard(final Card c, final boolean showFlipped) {
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initMatch(final List<Player> players, LobbyPlayer localPlayer) {
|
public static void initMatch(final List<Player> players, LobbyPlayer localPlayer) {
|
||||||
final String[] indices = FModel.getPreferences().getPref(FPref.UI_AVATARS).split(",");
|
final String[] indices = FModel.getPreferences().getPref(FPref.UI_AVATARS).split(",");
|
||||||
|
|
||||||
@@ -385,8 +376,6 @@ public class FControl {
|
|||||||
private static Set<Card> highlightedCards = new HashSet<Card>();
|
private static Set<Card> highlightedCards = new HashSet<Card>();
|
||||||
// used to highlight cards in UI
|
// used to highlight cards in UI
|
||||||
public static void setUsedToPay(Card card, boolean value) {
|
public static void setUsedToPay(Card card, boolean value) {
|
||||||
FThreads.assertExecutedByEdt(true);
|
|
||||||
|
|
||||||
boolean hasChanged = value ? highlightedCards.add(card) : highlightedCards.remove(card);
|
boolean hasChanged = value ? highlightedCards.add(card) : highlightedCards.remove(card);
|
||||||
if (hasChanged) { // since we are in UI thread, may redraw the card right now
|
if (hasChanged) { // since we are in UI thread, may redraw the card right now
|
||||||
updateSingleCard(card);
|
updateSingleCard(card);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public abstract class FGestureAdapter extends InputAdapter {
|
|||||||
if (!longPressed) {
|
if (!longPressed) {
|
||||||
longPressed = true;
|
longPressed = true;
|
||||||
if (longPress(pointer1.x, pointer1.y)) {
|
if (longPress(pointer1.x, pointer1.y)) {
|
||||||
Gdx.input.vibrate(50); //perform a quick vibrate to signify a successful long press
|
Gdx.input.vibrate(25); //perform a quick vibrate to signify a successful long press
|
||||||
endPress(pointer1.x, pointer1.y); //end press immediately if long press handled
|
endPress(pointer1.x, pointer1.y); //end press immediately if long press handled
|
||||||
longPressHandled = true;
|
longPressHandled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user