mirror of https://github.com/mgba-emu/mgba.git
Qt: Move solar sensor menu to emulation menu
This commit is contained in:
parent
7d980287cb
commit
67bc9e7280
|
@ -685,6 +685,25 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||||
}, this);
|
}, this);
|
||||||
m_config->updateOption("audioSync");
|
m_config->updateOption("audioSync");
|
||||||
|
|
||||||
|
emulationMenu->addSeparator();
|
||||||
|
|
||||||
|
QMenu* solarMenu = emulationMenu->addMenu(tr("Solar sensor"));
|
||||||
|
QAction* solarIncrease = new QAction(tr("Increase solar level"), solarMenu);
|
||||||
|
connect(solarIncrease, SIGNAL(triggered()), m_controller, SLOT(increaseLuminanceLevel()));
|
||||||
|
addControlledAction(solarMenu, solarIncrease, "increaseLuminanceLevel");
|
||||||
|
|
||||||
|
QAction* solarDecrease = new QAction(tr("Decrease solar level"), solarMenu);
|
||||||
|
connect(solarDecrease, SIGNAL(triggered()), m_controller, SLOT(decreaseLuminanceLevel()));
|
||||||
|
addControlledAction(solarMenu, solarDecrease, "decreaseLuminanceLevel");
|
||||||
|
|
||||||
|
QAction* maxSolar = new QAction(tr("Brightest solar level"), solarMenu);
|
||||||
|
connect(maxSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(10); });
|
||||||
|
addControlledAction(solarMenu, maxSolar, "maxLuminanceLevel");
|
||||||
|
|
||||||
|
QAction* minSolar = new QAction(tr("Darkest solar level"), solarMenu);
|
||||||
|
connect(minSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(0); });
|
||||||
|
addControlledAction(solarMenu, minSolar, "minLuminanceLevel");
|
||||||
|
|
||||||
QMenu* avMenu = menubar->addMenu(tr("Audio/&Video"));
|
QMenu* avMenu = menubar->addMenu(tr("Audio/&Video"));
|
||||||
m_shortcutController->addMenu(avMenu);
|
m_shortcutController->addMenu(avMenu);
|
||||||
QMenu* frameMenu = avMenu->addMenu(tr("Frame size"));
|
QMenu* frameMenu = avMenu->addMenu(tr("Frame size"));
|
||||||
|
@ -803,23 +822,6 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||||
addControlledAction(toolsMenu, gdbWindow, "gdbWindow");
|
addControlledAction(toolsMenu, gdbWindow, "gdbWindow");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QMenu* solarMenu = toolsMenu->addMenu(tr("Solar sensor"));
|
|
||||||
QAction* solarIncrease = new QAction(tr("Increase solar level"), solarMenu);
|
|
||||||
connect(solarIncrease, SIGNAL(triggered()), m_controller, SLOT(increaseLuminanceLevel()));
|
|
||||||
addControlledAction(solarMenu, solarIncrease, "increaseLuminanceLevel");
|
|
||||||
|
|
||||||
QAction* solarDecrease = new QAction(tr("Decrease solar level"), solarMenu);
|
|
||||||
connect(solarDecrease, SIGNAL(triggered()), m_controller, SLOT(decreaseLuminanceLevel()));
|
|
||||||
addControlledAction(solarMenu, solarDecrease, "decreaseLuminanceLevel");
|
|
||||||
|
|
||||||
QAction* maxSolar = new QAction(tr("Brightest solar level"), solarMenu);
|
|
||||||
connect(maxSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(10); });
|
|
||||||
addControlledAction(solarMenu, maxSolar, "maxLuminanceLevel");
|
|
||||||
|
|
||||||
QAction* minSolar = new QAction(tr("Darkest solar level"), solarMenu);
|
|
||||||
connect(minSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(0); });
|
|
||||||
addControlledAction(solarMenu, minSolar, "minLuminanceLevel");
|
|
||||||
|
|
||||||
toolsMenu->addSeparator();
|
toolsMenu->addSeparator();
|
||||||
addControlledAction(toolsMenu, toolsMenu->addAction(tr("Settings..."), this, SLOT(openSettingsWindow())), "settings");
|
addControlledAction(toolsMenu, toolsMenu->addAction(tr("Settings..."), this, SLOT(openSettingsWindow())), "settings");
|
||||||
addControlledAction(toolsMenu, toolsMenu->addAction(tr("Edit shortcuts..."), this, SLOT(openShortcutWindow())), "shortcuts");
|
addControlledAction(toolsMenu, toolsMenu->addAction(tr("Edit shortcuts..."), this, SLOT(openShortcutWindow())), "shortcuts");
|
||||||
|
|
Loading…
Reference in New Issue