Qt: Menu items for specific solar sensor brightness levels

This commit is contained in:
Jeffrey Pfau 2015-04-18 22:20:53 -07:00
parent a767ae2333
commit 3203158b1d
2 changed files with 11 additions and 1 deletions

View File

@ -4,12 +4,13 @@ Features:
- Ability to mute individual audio channels
- Palette viewer
- Volume control
- More shortcuts are editable (e.g. quick save/load, solar sensor)
- More shortcuts are editable (e.g. quick save/load)
- Rewind now shows the frame after rewinding
- Import/Export of GameShark/Action Replay snapshots
- Add "Step backwards" item for single increment rewind
- Deadzone estimation for game controllers
- Analog inputs can be used for shortcuts
- Menu items for specific solar sensor brightness levels
Bugfixes:
- GBA: Fix timers not updating timing when writing to only the reload register
- All: Fix sanitize-deb script not cleaning up after itself

View File

@ -763,6 +763,15 @@ void Window::setupMenu(QMenuBar* menubar) {
connect(minSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(0); });
addControlledAction(solarMenu, minSolar, "minLuminanceLevel");
solarMenu->addSeparator();
for (int i = 0; i <= 10; ++i) {
QAction* setSolar = new QAction(tr("Brightness %1").arg(QString::number(i)), solarMenu);
connect(setSolar, &QAction::triggered, [this, i]() {
m_controller->setLuminanceLevel(i);
});
addControlledAction(solarMenu, setSolar, QString("luminanceLevel.%1").arg(QString::number(i)));
}
QMenu* avMenu = menubar->addMenu(tr("Audio/&Video"));
m_shortcutController->addMenu(avMenu);
QMenu* frameMenu = avMenu->addMenu(tr("Frame size"));