[Client] Add option to use game time in game log timestamps (#2202)

Game log timestamps showed the local clock time, which is meaningless in
a replay or in a log read after the fact — nobody can tell when a play
happened relative to the game.

Add a "Use game time instead of local time in game logs" setting. When
enabled, the message log stamps entries with the elapsed game time
(HH:MM:SS since the game started); regular chat views keep the local
clock.
This commit is contained in:
Lukas Brübach 2026-09-06 12:24:31 +02:00
parent 0f003eabf9
commit 9dac371ead
12 changed files with 63 additions and 8 deletions

View file

@ -65,6 +65,11 @@ bool ChatSettings::getRoomHistory() const
return getValue("roomHistory", QString(), QString(), true).toBool();
}
bool ChatSettings::getUseGameTime() const
{
return getValue("useGameTime", QString(), QString(), false).toBool();
}
QString ChatSettings::getHighlightWords() const
{
return getValue("highlightWords").toString();
@ -131,6 +136,11 @@ void ChatSettings::setRoomHistory(bool _roomHistory)
setValue(_roomHistory, "roomHistory");
}
void ChatSettings::setUseGameTime(bool _useGameTime)
{
setValue(_useGameTime, "useGameTime");
}
void ChatSettings::setHighlightWords(const QString &_highlightWords)
{
setValue(_highlightWords, "highlightWords");

View file

@ -23,6 +23,7 @@ public:
[[nodiscard]] bool getShowMessagePopup() const override;
[[nodiscard]] bool getShowMentionPopup() const override;
[[nodiscard]] bool getRoomHistory() const override;
[[nodiscard]] bool getUseGameTime() const override;
[[nodiscard]] QString getHighlightWords() const override;
void setChatMention(bool _chatMention);
@ -37,6 +38,7 @@ public:
void setShowMessagePopups(bool _showMessagePopups);
void setShowMentionPopups(bool _showMentionPopups);
void setRoomHistory(bool _roomHistory);
void setUseGameTime(bool _useGameTime);
void setHighlightWords(const QString &_highlightWords);
signals: