Search in sources :

Example 6 with ChatMessage

use of de.gg.game.ui.data.ChatMessage 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
    }
}
Also used : ChatMessage(de.gg.game.ui.data.ChatMessage) UIRefreshEvent(de.gg.game.events.UIRefreshEvent)

Aggregations

ChatMessage (de.gg.game.ui.data.ChatMessage)6 UIRefreshEvent (de.gg.game.events.UIRefreshEvent)3 ImageTextButton (com.badlogic.gdx.scenes.scene2d.ui.ImageTextButton)1 Label (com.badlogic.gdx.scenes.scene2d.ui.Label)1 ScrollPane (com.badlogic.gdx.scenes.scene2d.ui.ScrollPane)1 Table (com.badlogic.gdx.scenes.scene2d.ui.Table)1 TextField (com.badlogic.gdx.scenes.scene2d.ui.TextField)1 TextFieldListener (com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener)1 OffsettableTextField (de.gg.engine.ui.components.OffsettableTextField)1 ButtonClickListener (de.gg.game.input.ButtonClickListener)1 GameClient (de.gg.game.network.GameClient)1 GameServer (de.gg.game.network.GameServer)1 PlayerLobbyConfigDialog (de.gg.game.ui.dialogs.PlayerLobbyConfigDialog)1