add in-game time as checkbox in settings

This commit is contained in:
Lily 2025-03-11 22:00:04 -04:00
parent 71fff5dbd0
commit a9d3e73c15
No known key found for this signature in database
GPG key ID: D916CEDDF4F93CE7
5 changed files with 26 additions and 1 deletions

View file

@ -1100,6 +1100,10 @@ MessagesSettingsPage::MessagesSettingsPage()
connect(&messagePopups, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
&SettingsCache::setShowMessagePopups);
localTimeCheckBox.setChecked(SettingsCache::instance().getLocalTime());
connect(&localTimeCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
&SettingsCache::setLocalTime);
mentionPopups.setChecked(SettingsCache::instance().getShowMentionPopup());
connect(&mentionPopups, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
&SettingsCache::setShowMentionPopups);
@ -1112,6 +1116,9 @@ MessagesSettingsPage::MessagesSettingsPage()
connect(customAlertString, SIGNAL(textChanged(QString)), &SettingsCache::instance(),
SLOT(setHighlightWords(QString)));
auto *chatGrid = new QGridLayout;
chatGrid->addWidget(&chatMentionCheckBox, 0, 0);
chatGrid->addWidget(&invertMentionForeground, 0, 1);
@ -1123,6 +1130,7 @@ MessagesSettingsPage::MessagesSettingsPage()
chatGrid->addWidget(&messagePopups, 4, 0);
chatGrid->addWidget(&mentionPopups, 5, 0);
chatGrid->addWidget(&roomHistory, 6, 0);
chatGrid->addWidget(&localTimeCheckBox, 7, 0);
chatGroupBox = new QGroupBox;
chatGroupBox->setLayout(chatGrid);
@ -1305,6 +1313,7 @@ void MessagesSettingsPage::retranslateUi()
aAdd->setText(tr("Add New Message"));
aEdit->setText(tr("Edit Message"));
aRemove->setText(tr("Remove Message"));
localTimeCheckBox.setText(tr("Enable In-Game Time"));
}
SoundSettingsPage::SoundSettingsPage()

View file

@ -239,6 +239,7 @@ private:
QCheckBox invertHighlightForeground;
QCheckBox ignoreUnregUsersMainChat;
QCheckBox ignoreUnregUserMessages;
QCheckBox localTimeCheckBox;
QCheckBox messagePopups;
QCheckBox mentionPopups;
QCheckBox roomHistory;
@ -252,7 +253,7 @@ private:
QLabel hexHighlightLabel;
QLabel customAlertStringLabel;
QLabel explainMessagesLabel;
void storeSettings();
void updateMentionPreview();
void updateHighlightPreview();