mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-16 07:22:16 -07:00
add in-game time as checkbox in settings
This commit is contained in:
parent
71fff5dbd0
commit
a9d3e73c15
5 changed files with 26 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue