use of de.gg.game.events.UIRefreshEvent in project ProjektGG by eskalon.
the class GameClient method onNotificationCreation.
@Subscribe
public void onNotificationCreation(NotificationCreationEvent ev) {
notifications.add(ev.getData());
eventBus.post(new UIRefreshEvent());
}
use of de.gg.game.events.UIRefreshEvent in project ProjektGG by eskalon.
the class ClientsideResultListener method onLobbyPlayerChanged.
@Override
public void onLobbyPlayerChanged(short playerId, LobbyPlayer player) {
LobbyPlayer local = client.lobbyPlayers.get(playerId);
local.setName(player.getName());
local.setSurname(player.getSurname());
local.setMale(player.isMale());
local.setIcon(player.getIcon());
local.setProfessionTypeIndex(player.getProfessionTypeIndex());
local.setReady(player.isReady());
local.setReligion(player.getReligion());
eventBus.post(new UIRefreshEvent());
}
use of de.gg.game.events.UIRefreshEvent in project ProjektGG by eskalon.
the class ClientsideResultListener method onChatMessage.
@Override
public void onChatMessage(short senderId, String message) {
if (senderId != client.getLocalNetworkID()) {
client.chatMessages.add(new ChatMessage(client.lobbyPlayers.get(senderId), message));
eventBus.post(new UIRefreshEvent());
}
}
use of de.gg.game.events.UIRefreshEvent in project ProjektGG by eskalon.
the class ClientsideResultListener method onPlayerJoined.
@Override
public void onPlayerJoined(short id, LobbyPlayer player) {
client.lobbyPlayers.put(id, player);
client.chatMessages.add(new ChatMessage(Lang.get("screen.lobby.player_joined", player)));
eventBus.post(new UIRefreshEvent());
}
use of de.gg.game.events.UIRefreshEvent in project ProjektGG by eskalon.
the class ClientsideResultListener method onPlayerLeft.
@Override
public void onPlayerLeft(short playerId) {
client.chatMessages.add(new ChatMessage(Lang.get("screen.lobby.player_left", client.lobbyPlayers.get(playerId))));
client.lobbyPlayers.remove(playerId);
eventBus.post(new UIRefreshEvent());
if (!client.isInLobby()) {
// TODO adapt session data
}
}
Aggregations