Commit 3609ff9e authored by Peter Patel-Schneider's avatar Peter Patel-Schneider

only use new input methods if in desktop GUI; remove debugging prints

parent 09fc3ae6
......@@ -184,7 +184,6 @@ public class ListCardArea extends CardArea {
//update index of dragged card in hand zone to match new index within hand area
final int index = getCardPanels().indexOf(dragPanel);
if (validIndex(dragCard,index)) {
System.out.print("Really move card to index "); System.out.println(index);
synchronized (cardList) {
cardList.remove(dragCard);
cardList.add(index, dragCard);
......@@ -195,10 +194,8 @@ public class ListCardArea extends CardArea {
}
private void loadLocation() {
System.out.println("loadlocation");
if (locPref != null) {
String value = prefs.getPref(locPref);
System.out.print(locPref); System.out.println(value);
if (value.length() > 0) {
String[] coords = value.split(COORD_DELIM);
if (coords.length == 4) {
......
......@@ -523,7 +523,8 @@ public class MatchController extends AbstractGuiGame {
@Override
public List<Card> manipulateCardList(final String title, final List<Card> cards, final List<Card> manipulable, final boolean toTop, final boolean toBottom, final boolean toAnywhere) {
return null; // pfps not implemented yet
System.err.println("Not implemented yet - should never be called");
return null;
}
@Override
......
......@@ -349,9 +349,9 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
}
private boolean useSelectCardsInput(final FCollectionView<? extends GameEntity> sourceList) {
if ( FThreads.isGuiThread() ) { return false; } // can't use InputSelect from GUI thread (e.g., DevMode Tutor)
// if UI_SELECT_FROM_CARD_DISPLAYS not set use InputSelect only for battlefield and player hand
// if UI_SELECT_FROM_CARD_DISPLAYS set use InputSelect for any zone that can be shown
if ( FThreads.isGuiThread() ) { return false; } // also can't use InputSelect from GUI thread (e.g., DevMode Tutor)
// if UI_SELECT_FROM_CARD_DISPLAYS set and using desktop GUI use InputSelect for any zone that can be shown
for (final GameEntity c : sourceList) {
if (c instanceof Player) {
continue;
......@@ -362,7 +362,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final Zone cz = ((Card) c).getZone();
final boolean useUiPointAtCard =
cz != null &&
FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) ?
(FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) && (!GuiBase.getInterface().isLibgdxPort()) ) ?
(cz.is(ZoneType.Battlefield) || cz.is(ZoneType.Hand) || cz.is(ZoneType.Library) ||
cz.is(ZoneType.Graveyard) || cz.is(ZoneType.Exile) || cz.is(ZoneType.Flashback) || cz.is(ZoneType.Command)) :
(cz.is(ZoneType.Hand) && cz.getPlayer() == player || cz.is(ZoneType.Battlefield));
......@@ -758,14 +758,14 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
CardCollection toTop = null;
tempShowCards(topN);
if ( FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) ) {
if ( FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) &&
(!GuiBase.getInterface().isLibgdxPort()) ) {
ArrayList<Card> cardList = new ArrayList<Card>(); // pfps there must be a better way
for (final Card card : player.getCardsIn(ZoneType.Library)) {
cardList.add(card);
}
ImmutablePair<CardCollection, CardCollection> result =
arrangeForMove("Move cards to top or bottom of library", cardList, topN, true, true);
System.out.print("Arrange "); System.out.println(result);
toTop = result.getLeft();
toBottom = result.getRight();
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment