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())); }
void GameObject::setupMaterials( AbstractGraphicObject &obj, const ProtoObject::View &src ) { game().setupMaterials( obj, src, teamColor() ); }