all repos — mgba @ 3203158b1d6eaf7a8c88f648c639981af4568bc7

mGBA Game Boy Advance Emulator

Qt: Menu items for specific solar sensor brightness levels
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Apr 2015 22:20:53 -0700
commit

3203158b1d6eaf7a8c88f648c639981af4568bc7

parent

a767ae2333490b6736616a1524442e5e96addb5d

2 files changed, 11 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -4,12 +4,13 @@ - Ability to hide individual background layers, or OBJs

- 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
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -763,6 +763,15 @@ QAction* minSolar = new QAction(tr("Darkest solar level"), solarMenu);

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"));