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
public void setCard(Card card) {
FControl.setCard(card);
//doesn't need to do anything
}
@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) {
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>();
// used to highlight cards in UI
public static void setUsedToPay(Card card, boolean value) {
FThreads.assertExecutedByEdt(true);
boolean hasChanged = value ? highlightedCards.add(card) : highlightedCards.remove(card);
if (hasChanged) { // since we are in UI thread, may redraw the card right now
updateSingleCard(card);

View File

@@ -48,7 +48,7 @@ public abstract class FGestureAdapter extends InputAdapter {
if (!longPressed) {
longPressed = true;
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
longPressHandled = true;
}