local time changes part 1

This commit is contained in:
Lily 2025-03-11 19:36:22 -04:00
parent 5238087ddf
commit 71fff5dbd0
No known key found for this signature in database
GPG key ID: D916CEDDF4F93CE7
6 changed files with 46 additions and 389 deletions

View file

@ -12,6 +12,19 @@
#include <utility>
const QString MessageLogWidget::getCurrentTime()
{
int seconds = *elapsedSeconds;
int minutes = seconds / 60;
seconds -= minutes * 60;
int hours = minutes / 60;
minutes -= hours * 60;
return QString("[%1:%2:%3] ")
.arg(QString::number(hours).rightJustified(2, '0'))
.arg(QString::number(minutes).rightJustified(2, '0'))
.arg(QString::number(seconds).rightJustified(2, '0'));
}
const QString &MessageLogWidget::tableConstant() const
{
static const QString constant("table");
@ -858,7 +871,9 @@ void MessageLogWidget::connectToPlayer(Player *player)
SLOT(logAlwaysLookAtTopCard(Player *, CardZone *, bool)));
}
MessageLogWidget::MessageLogWidget(TabSupervisor *_tabSupervisor, TabGame *_game, QWidget *parent)
MessageLogWidget::MessageLogWidget(TabSupervisor *_tabSupervisor, TabGame *_game, int *seconds, QWidget *parent)
: ChatView(_tabSupervisor, _game, true, parent), mulliganNumber(0), currentContext(MessageContext_None)
{
elapsedSeconds = seconds;
ChatView::setTime(seconds);
}