mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -07:00
Add setting for which deck editor tab to open deck in (#5895)
* Create new setting * Update settings dlg * implement functionality * Make setting into an enum
This commit is contained in:
parent
24e27d3c31
commit
57c6f2716f
10 changed files with 70 additions and 5 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "../client/network/release_channel.h"
|
||||
#include "../client/network/spoiler_background_updater.h"
|
||||
#include "../client/sound_engine.h"
|
||||
#include "../client/tabs/tab_supervisor.h"
|
||||
#include "../client/ui/picture_loader/picture_loader.h"
|
||||
#include "../client/ui/theme_manager.h"
|
||||
#include "../deck/custom_line_edit.h"
|
||||
|
|
@ -699,12 +700,20 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
|
|||
index == visualDeckStoragePromptForConversionIndexAlways);
|
||||
});
|
||||
|
||||
defaultDeckEditorTypeSelector.addItem(""); // these will be set in retranslateUI
|
||||
defaultDeckEditorTypeSelector.addItem("");
|
||||
defaultDeckEditorTypeSelector.setCurrentIndex(SettingsCache::instance().getDefaultDeckEditorType());
|
||||
connect(&defaultDeckEditorTypeSelector, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
&SettingsCache::instance(), &SettingsCache::setDefaultDeckEditorType);
|
||||
|
||||
auto *deckEditorGrid = new QGridLayout;
|
||||
deckEditorGrid->addWidget(&openDeckInNewTabCheckBox, 0, 0);
|
||||
deckEditorGrid->addWidget(&visualDeckStorageInGameCheckBox, 1, 0);
|
||||
deckEditorGrid->addWidget(&visualDeckStorageSelectionAnimationCheckBox, 2, 0);
|
||||
deckEditorGrid->addWidget(&visualDeckStoragePromptForConversionLabel, 3, 0);
|
||||
deckEditorGrid->addWidget(&visualDeckStoragePromptForConversionSelector, 3, 1);
|
||||
deckEditorGrid->addWidget(&defaultDeckEditorTypeLabel, 4, 0);
|
||||
deckEditorGrid->addWidget(&defaultDeckEditorTypeSelector, 4, 1);
|
||||
|
||||
deckEditorGroupBox = new QGroupBox;
|
||||
deckEditorGroupBox->setLayout(deckEditorGrid);
|
||||
|
|
@ -774,6 +783,9 @@ void UserInterfaceSettingsPage::retranslateUi()
|
|||
tr("ask to convert to .cod"));
|
||||
visualDeckStoragePromptForConversionSelector.setItemText(visualDeckStoragePromptForConversionIndexAlways,
|
||||
tr("always convert to .cod"));
|
||||
defaultDeckEditorTypeLabel.setText(tr("Default deck editor type"));
|
||||
defaultDeckEditorTypeSelector.setItemText(TabSupervisor::ClassicDeckEditor, tr("Classic Deck Editor"));
|
||||
defaultDeckEditorTypeSelector.setItemText(TabSupervisor::VisualDeckEditor, tr("Visual Deck Editor"));
|
||||
replayGroupBox->setTitle(tr("Replay settings"));
|
||||
rewindBufferingMsLabel.setText(tr("Buffer time for backwards skip via shortcut:"));
|
||||
rewindBufferingMsBox.setSuffix(" ms");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue