diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2018-03-26 04:17:47 +0200 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2018-04-19 10:42:24 +0200 |
| commit | c09075209f15d3b48922c148fb8a6878239cd93f (patch) | |
| tree | eeefe6d5af5548c44982a09bc91e18c90c0f7af2 /Source/Core/DolphinQt2/MenuBar.cpp | |
| parent | 396204248daa3946e7db8f5a733b82f64d4a160d (diff) | |
Qt: Implement Cheats Manager
Diffstat (limited to 'Source/Core/DolphinQt2/MenuBar.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/MenuBar.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt2/MenuBar.cpp b/Source/Core/DolphinQt2/MenuBar.cpp index c63e3cf472..96541345fc 100644 --- a/Source/Core/DolphinQt2/MenuBar.cpp +++ b/Source/Core/DolphinQt2/MenuBar.cpp @@ -99,6 +99,9 @@ void MenuBar::OnEmulationStateChanged(Core::State state) m_recording_stop->setEnabled(false); m_recording_play->setEnabled(!running); + // Tools + m_show_cheat_manager->setEnabled(Settings::Instance().GetCheatsEnabled()); + // Symbols m_symbols->setEnabled(running); @@ -167,6 +170,13 @@ void MenuBar::AddToolsMenu() AddAction(tools_menu, tr("&Memory Card Manager (GC)"), this, [this] { emit ShowMemcardManager(); }); + m_show_cheat_manager = + AddAction(tools_menu, tr("&Cheats Manager"), this, [this] { emit ShowCheatsManager(); }); + + connect(&Settings::Instance(), &Settings::EnableCheatsChanged, [this](bool enabled) { + m_show_cheat_manager->setEnabled(Core::GetState() != Core::State::Uninitialized && enabled); + }); + tools_menu->addSeparator(); AddAction(tools_menu, tr("Import Wii Save..."), this, &MenuBar::ImportWiiSave); |
