Changed color of frame of avatar for active player to green again. Checked that a player of a game can't also watch his own game. Added a match score to the start of the game log. Changed the color of the Turn [X] message. Tips and join messages during a game are displayed in the chat panel instead the game log panel. Display of the player name when hovering over the avatar is more vertical centered.

This commit is contained in:
LevelX2 2013-04-07 21:29:27 +02:00
parent 20a99ed894
commit f644ffe041
16 changed files with 100 additions and 22 deletions

View file

@ -136,6 +136,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
protected RangeOfInfluence range;
protected MultiplayerAttackOption attackOption;
protected GameOptions gameOptions;
protected String startMessage;
public static volatile int copyCount = 0;
public static volatile long copyTime = 0;
@ -536,7 +537,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
}
private boolean playTurn(Player player) {
fireInformEvent("Turn " + Integer.toString(state.getTurnNum()));
fireStatusEvent("Turn " + Integer.toString(state.getTurnNum()), true);
if (checkStopOnTurnOption()) {
return false;
}
@ -567,7 +568,11 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
for (Player player: state.getPlayers().values()) {
player.beginTurn(this);
}
fireInformEvent("game has started");
if (startMessage.isEmpty()) {
startMessage = "Game has started";
}
fireStatusEvent(startMessage, false);
//saveState();
//20091005 - 103.1
@ -1394,6 +1399,14 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
tableEventSource.fireTableEvent(EventType.INFO, message, this);
}
@Override
public void fireStatusEvent(String message, boolean withTime) {
if (simulation) {
return;
}
tableEventSource.fireTableEvent(EventType.STATUS, message, withTime, this);
}
@Override
public void fireUpdatePlayersEvent() {
if (simulation) {
@ -1804,4 +1817,8 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
public boolean getScopeRelevant() {
return this.scopeRelevant;
}
public void setStartMessage(String startMessage) {
this.startMessage = startMessage;
}
}