Prevent crash when selecting cards for cleanup

This commit is contained in:
drdev
2014-05-14 01:38:35 +00:00
parent d4c05b46ed
commit f072840db2
3 changed files with 2 additions and 13 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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;
} }