mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-23 02:42:16 -07:00
add new setting to window
This commit is contained in:
parent
d660f2e101
commit
015d30fb82
2 changed files with 20 additions and 0 deletions
|
|
@ -508,12 +508,26 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
|
||||||
deckEditorGroupBox = new QGroupBox;
|
deckEditorGroupBox = new QGroupBox;
|
||||||
deckEditorGroupBox->setLayout(deckEditorGrid);
|
deckEditorGroupBox->setLayout(deckEditorGrid);
|
||||||
|
|
||||||
|
// replay settings
|
||||||
|
rewindBufferingMsBox.setValue(SettingsCache::instance().getRewindBufferingMs());
|
||||||
|
rewindBufferingMsBox.setRange(0, 9999);
|
||||||
|
connect(&rewindBufferingMsBox, &QSpinBox::valueChanged, &SettingsCache::instance(),
|
||||||
|
&SettingsCache::setRewindBufferingMs);
|
||||||
|
|
||||||
|
auto *replayGrid = new QGridLayout;
|
||||||
|
replayGrid->addWidget(&rewindBufferingMsLabel, 0, 0, 1, 1);
|
||||||
|
replayGrid->addWidget(&rewindBufferingMsBox, 0, 1, 1, 1);
|
||||||
|
|
||||||
|
replayGroupBox = new QGroupBox;
|
||||||
|
replayGroupBox->setLayout(replayGrid);
|
||||||
|
|
||||||
// putting it all together
|
// putting it all together
|
||||||
auto *mainLayout = new QVBoxLayout;
|
auto *mainLayout = new QVBoxLayout;
|
||||||
mainLayout->addWidget(generalGroupBox);
|
mainLayout->addWidget(generalGroupBox);
|
||||||
mainLayout->addWidget(notificationsGroupBox);
|
mainLayout->addWidget(notificationsGroupBox);
|
||||||
mainLayout->addWidget(animationGroupBox);
|
mainLayout->addWidget(animationGroupBox);
|
||||||
mainLayout->addWidget(deckEditorGroupBox);
|
mainLayout->addWidget(deckEditorGroupBox);
|
||||||
|
mainLayout->addWidget(replayGroupBox);
|
||||||
mainLayout->addStretch();
|
mainLayout->addStretch();
|
||||||
|
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
|
|
@ -544,6 +558,9 @@ void UserInterfaceSettingsPage::retranslateUi()
|
||||||
tapAnimationCheckBox.setText(tr("&Tap/untap animation"));
|
tapAnimationCheckBox.setText(tr("&Tap/untap animation"));
|
||||||
deckEditorGroupBox->setTitle(tr("Deck editor settings"));
|
deckEditorGroupBox->setTitle(tr("Deck editor settings"));
|
||||||
openDeckInNewTabCheckBox.setText(tr("Always open deck in new tab"));
|
openDeckInNewTabCheckBox.setText(tr("Always open deck in new tab"));
|
||||||
|
replayGroupBox->setTitle(tr("Replay settings"));
|
||||||
|
rewindBufferingMsLabel.setText(tr("Amount of time to buffer a backwards skip from keyboard shortcut by:"));
|
||||||
|
rewindBufferingMsBox.setSuffix(tr(" ms"));
|
||||||
}
|
}
|
||||||
|
|
||||||
DeckEditorSettingsPage::DeckEditorSettingsPage()
|
DeckEditorSettingsPage::DeckEditorSettingsPage()
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,13 @@ private:
|
||||||
QCheckBox useTearOffMenusCheckBox;
|
QCheckBox useTearOffMenusCheckBox;
|
||||||
QCheckBox tapAnimationCheckBox;
|
QCheckBox tapAnimationCheckBox;
|
||||||
QCheckBox openDeckInNewTabCheckBox;
|
QCheckBox openDeckInNewTabCheckBox;
|
||||||
|
QLabel rewindBufferingMsLabel;
|
||||||
|
QSpinBox rewindBufferingMsBox;
|
||||||
QGroupBox *generalGroupBox;
|
QGroupBox *generalGroupBox;
|
||||||
QGroupBox *notificationsGroupBox;
|
QGroupBox *notificationsGroupBox;
|
||||||
QGroupBox *animationGroupBox;
|
QGroupBox *animationGroupBox;
|
||||||
QGroupBox *deckEditorGroupBox;
|
QGroupBox *deckEditorGroupBox;
|
||||||
|
QGroupBox *replayGroupBox;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UserInterfaceSettingsPage();
|
UserInterfaceSettingsPage();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue