Beispiel #1
0
void PrivateChatTab::userLeftBattle(User const & user, Battle const & battle)
{
    if (user.name() == userName_)
    {
        append(userName_ + " left " + battle.title(), -1);
    }
}
Beispiel #2
0
void PrivateChatTab::userJoinedBattle(User const & user, Battle const & battle)
{
    if (user.name() == userName_)
    {
        append(userName_ + " joined " + battle.title(), -1);
    }
}
Beispiel #3
0
void BattleInfo::setHeaderText(Battle const & battle)
{
    std::ostringstream oss;
    oss << battle.title() << " / " << battle.founder() << " / " << battle.engineVersion() <<"\n"
        << battle.mapName() << "\n"
        << battle.modName() << "\n"
        << "Users:";

    for (Battle::BattleUsers::value_type pair : battle.users())
    {
        assert(pair.second);
        User const & u = *pair.second;
        oss << "  " << u.name();
    }

    headerText_->value(oss.str().c_str());
}