mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
[Mobile] refactor netplay phase indicator
This commit is contained in:
@@ -223,11 +223,15 @@ public class MatchController extends AbstractGuiGame {
|
||||
final VPhaseIndicator.PhaseLabel phaseLabel = view.getPlayerPanel(lastPlayer).getPhaseIndicator().getLabel(ph);
|
||||
if (phaseLabel != null)
|
||||
phaseLabel.setActive(true);
|
||||
if (GuiBase.isNetworkplay())
|
||||
getGameView().updateNeedsPhaseRedrawn(lastPlayer, PhaseType.CLEANUP);
|
||||
} else if (getGameView().getPlayerTurn() != null) {
|
||||
//set phaselabel
|
||||
final VPhaseIndicator.PhaseLabel phaseLabel = view.getPlayerPanel(getGameView().getPlayerTurn()).getPhaseIndicator().getLabel(ph);
|
||||
if (phaseLabel != null)
|
||||
phaseLabel.setActive(true);
|
||||
if (GuiBase.isNetworkplay())
|
||||
getGameView().updateNeedsPhaseRedrawn(getGameView().getPlayerTurn(), ph);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -442,6 +442,17 @@ public class MatchScreen extends FScreen {
|
||||
if (activeEffect != null) {
|
||||
activeEffect.draw(g, 10, 10, 100, 100);
|
||||
}
|
||||
|
||||
if (game.getNeedsPhaseRedrawn()) {
|
||||
resetAllPhaseButtons();
|
||||
if (game.getPlayerTurn() != null && game.getPhase() != null) {
|
||||
final PhaseLabel phaseLabel = getPlayerPanel(game.getPlayerTurn()).getPhaseIndicator().getLabel(game.getPhase());
|
||||
if (phaseLabel != null) {
|
||||
phaseLabel.setActive(true);
|
||||
game.clearNeedsPhaseRedrawn();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user