Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
Forge
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Walter Adolph
Forge
Commits
3609ff9e
Commit
3609ff9e
authored
Jan 11, 2019
by
Peter Patel-Schneider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only use new input methods if in desktop GUI; remove debugging prints
parent
09fc3ae6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
forge-gui-desktop/src/main/java/forge/view/arcane/ListCardArea.java
...desktop/src/main/java/forge/view/arcane/ListCardArea.java
+0
-3
forge-gui-mobile/src/forge/screens/match/MatchController.java
...e-gui-mobile/src/forge/screens/match/MatchController.java
+2
-1
forge-gui/src/main/java/forge/player/PlayerControllerHuman.java
...gui/src/main/java/forge/player/PlayerControllerHuman.java
+5
-5
No files found.
forge-gui-desktop/src/main/java/forge/view/arcane/ListCardArea.java
View file @
3609ff9e
...
...
@@ -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
)
{
...
...
forge-gui-mobile/src/forge/screens/match/MatchController.java
View file @
3609ff9e
...
...
@@ -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
...
...
forge-gui/src/main/java/forge/player/PlayerControllerHuman.java
View file @
3609ff9e
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment