Beispiel #1
0
bool PawnConverter::updateItem(QListWidgetItem *item, const Pawn &pawn)
{
    if (!item)
        return postError("Can't update item: item is null");

    if (pawn.isNull())
        return postError("Can't update item: pawn is null");

    item->setText(toShortDescription(pawn));
    item->setForeground(QBrush(teamColor(pawn)));

    return postSuccess(QString("Item %1 have been updated successfully").arg(item->text()));
}
Beispiel #2
0
void GameObject::setupMaterials( AbstractGraphicObject &obj,
                                 const ProtoObject::View &src ) {
  game().setupMaterials( obj, src, teamColor() );
  }