mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-09 00:28:42 +12:00
Add volume curve setting (#658)
* Add volume curve setting * Qt: Add missing translations
This commit is contained in:
parent
545ac81d81
commit
5f822b32d5
7 changed files with 60 additions and 5 deletions
|
@ -69,7 +69,7 @@ void CheatEntryWidget::editClicked() {
|
|||
}
|
||||
|
||||
CheatEditDialog::CheatEditDialog(Emulator* emu, CheatEntryWidget& cheatEntry) : QDialog(), emu(emu), cheatEntry(cheatEntry) {
|
||||
setWindowTitle("Edit Cheat");
|
||||
setWindowTitle(tr("Edit Cheat"));
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
setModal(true);
|
||||
|
@ -161,7 +161,7 @@ void CheatEditDialog::rejected() {
|
|||
|
||||
CheatsWindow::CheatsWindow(Emulator* emu, const std::filesystem::path& cheatPath, QWidget* parent)
|
||||
: QWidget(parent, Qt::Window), emu(emu), cheatPath(cheatPath) {
|
||||
setWindowTitle("Cheats");
|
||||
setWindowTitle(tr("Cheats"));
|
||||
mainWindow = static_cast<MainWindow*>(parent);
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout;
|
||||
|
|
|
@ -240,6 +240,16 @@ ConfigWindow::ConfigWindow(ConfigCallback configCallback, MainWindowCallback win
|
|||
connectCheckbox(muteAudio, config.audioDeviceConfig.muteAudio);
|
||||
audioLayout->addRow(muteAudio);
|
||||
|
||||
QComboBox* volumeCurveType = new QComboBox;
|
||||
volumeCurveType->addItem(tr("Cubic"));
|
||||
volumeCurveType->addItem(tr("Linear"));
|
||||
volumeCurveType->setCurrentIndex(static_cast<int>(config.audioDeviceConfig.volumeCurve));
|
||||
connect(volumeCurveType, &QComboBox::currentIndexChanged, this, [&](int index) {
|
||||
config.audioDeviceConfig.volumeCurve = static_cast<AudioDeviceConfig::VolumeCurve>(index);
|
||||
updateConfig();
|
||||
});
|
||||
audioLayout->addRow(tr("Volume curve"), volumeCurveType);
|
||||
|
||||
QSpinBox* volumeRaw = new QSpinBox();
|
||||
volumeRaw->setRange(0, 200);
|
||||
volumeRaw->setValue(config.audioDeviceConfig.volumeRaw * 100);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "io_file.hpp"
|
||||
|
||||
PatchWindow::PatchWindow(QWidget* parent) : QWidget(parent, Qt::Window) {
|
||||
setWindowTitle("ROM patcher");
|
||||
setWindowTitle(tr("ROM patcher"));
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout;
|
||||
layout->setContentsMargins(6, 6, 6, 6);
|
||||
|
|
|
@ -9,7 +9,7 @@ using namespace Zep;
|
|||
|
||||
TextEditorWindow::TextEditorWindow(QWidget* parent, const std::string& filename, const std::string& initialText)
|
||||
: QDialog(parent), zepWidget(this, qApp->applicationDirPath().toStdString(), fontSize) {
|
||||
setWindowTitle("Lua Editor");
|
||||
setWindowTitle(tr("Lua Editor"));
|
||||
resize(600, 600);
|
||||
|
||||
// Register our extensions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue