mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 15:02:16 -07:00
update logic to tab_game, and make message_log_widet/chat_view reliant
This commit is contained in:
parent
3dec02c53e
commit
15c1b429fc
6 changed files with 17 additions and 49 deletions
|
|
@ -14,19 +14,7 @@
|
|||
|
||||
const QString MessageLogWidget::getCurrentTime()
|
||||
{
|
||||
if (showInGameTime) {
|
||||
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'));
|
||||
} else {
|
||||
return QDateTime::currentDateTime().toString("[hh:mm:ss] ");
|
||||
}
|
||||
return ChatView::getCurrentTime();
|
||||
}
|
||||
|
||||
const QString &MessageLogWidget::tableConstant() const
|
||||
|
|
@ -874,10 +862,7 @@ void MessageLogWidget::connectToPlayer(Player *player)
|
|||
SLOT(logAlwaysLookAtTopCard(Player *, CardZone *, bool)));
|
||||
}
|
||||
|
||||
MessageLogWidget::MessageLogWidget(TabSupervisor *_tabSupervisor, TabGame *_game, int *seconds, QWidget *parent)
|
||||
MessageLogWidget::MessageLogWidget(TabSupervisor *_tabSupervisor, TabGame *_game, QWidget *parent)
|
||||
: ChatView(_tabSupervisor, _game, true, parent), mulliganNumber(0), currentContext(MessageContext_None)
|
||||
{
|
||||
showInGameTime = SettingsCache::instance().getLocalTime();
|
||||
elapsedSeconds = seconds;
|
||||
ChatView::setTime(seconds);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue