This commit is contained in:
lilyhuang-github 2025-04-20 22:25:24 -07:00 committed by GitHub
commit 3c841fe03b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 59 additions and 19 deletions

View file

@ -12,6 +12,11 @@
#include <utility>
const QString MessageLogWidget::getCurrentTime()
{
return ChatView::getCurrentTime();
}
const QString &MessageLogWidget::tableConstant() const
{
static const QString constant("table");
@ -615,14 +620,13 @@ void MessageLogWidget::logSetActivePhase(int phaseNumber)
soundEngine->playSound(phase.soundFileName);
appendHtml("<font color=\"" + phase.color + "\"><b>" + QDateTime::currentDateTime().toString("[hh:mm:ss] ") +
phase.getName() + "</b></font>");
appendHtml("<font color=\"" + phase.color + "\"><b>" + getCurrentTime() + phase.getName() + "</b></font>");
}
void MessageLogWidget::logSetActivePlayer(Player *player)
{
appendHtml("<br><font color=\"green\"><b>" + QDateTime::currentDateTime().toString("[hh:mm:ss] ") +
QString(tr("%1's turn.")).arg(player->getName()) + "</b></font><br>");
appendHtml("<br><font color=\"green\"><b>" + getCurrentTime() + QString(tr("%1's turn.")).arg(player->getName()) +
"</b></font><br>");
}
void MessageLogWidget::logSetAnnotation(Player *player, CardItem *card, QString newAnnotation)