Esempio n. 1
0
void MenuBar::OnEmulationStateChanged(Core::State state)
{
  bool running = state != Core::State::Uninitialized;
  bool playing = running && state != Core::State::Paused;

  // Emulation
  m_play_action->setEnabled(!playing);
  m_play_action->setVisible(!playing);
  m_pause_action->setEnabled(playing);
  m_pause_action->setVisible(playing);
  m_stop_action->setEnabled(running);
  m_stop_action->setVisible(running);
  m_reset_action->setEnabled(running);
  m_fullscreen_action->setEnabled(running);
  m_frame_advance_action->setEnabled(running);
  m_screenshot_action->setEnabled(running);
  m_state_load_menu->setEnabled(running);
  m_state_save_menu->setEnabled(running);

  // Movie
  m_recording_read_only->setEnabled(running);
  if (!running)
    m_recording_stop->setEnabled(false);
  m_recording_play->setEnabled(!running);

  UpdateStateSlotMenu();
  UpdateToolsMenu(running);

  OnDebugModeToggled(Settings::Instance().IsDebugModeEnabled());
}
Esempio n. 2
0
void UpdateAllMenus(anime::Item* anime_item) {
  UpdateAnimeMenu(anime_item);
  UpdateAnnounceMenu();
  UpdateExternalLinksMenu();
  UpdateFoldersMenu();
  UpdateToolsMenu();
  UpdateTrayMenu();
  UpdateViewMenu();
}
Esempio n. 3
0
void MenuBar::AddToolsMenu()
{
  QMenu* tools_menu = addMenu(tr("&Tools"));

  AddAction(tools_menu, tr("Import Wii Save..."), this, &MenuBar::ImportWiiSave);
  AddAction(tools_menu, tr("Export All Wii Saves"), this, &MenuBar::ExportWiiSaves);

  tools_menu->addSeparator();

  m_wad_install_action = AddAction(tools_menu, tr("Install WAD..."), this, &MenuBar::InstallWAD);

  tools_menu->addSeparator();
  QMenu* gc_ipl = tools_menu->addMenu(tr("Load GameCube Main Menu"));

  m_ntscj_ipl = AddAction(gc_ipl, tr("NTSC-J"), this,
                          [this] { emit BootGameCubeIPL(DiscIO::Region::NTSC_J); });
  m_ntscu_ipl = AddAction(gc_ipl, tr("NTSC-U"), this,
                          [this] { emit BootGameCubeIPL(DiscIO::Region::NTSC_U); });
  m_pal_ipl =
      AddAction(gc_ipl, tr("PAL"), this, [this] { emit BootGameCubeIPL(DiscIO::Region::PAL); });

  AddAction(tools_menu, tr("Start &NetPlay..."), this, &MenuBar::StartNetPlay);
  AddAction(tools_menu, tr("FIFO Player"), this, &MenuBar::ShowFIFOPlayer);

  tools_menu->addSeparator();

  // Label will be set by a NANDRefresh later
  m_boot_sysmenu =
      AddAction(tools_menu, QStringLiteral(""), this, [this] { emit BootWiiSystemMenu(); });
  m_import_backup = AddAction(tools_menu, tr("Import BootMii NAND Backup..."), this,
                              [this] { emit ImportNANDBackup(); });
  m_check_nand = AddAction(tools_menu, tr("Check NAND..."), this, &MenuBar::CheckNAND);
  m_extract_certificates = AddAction(tools_menu, tr("Extract Certificates from NAND"), this,
                                     &MenuBar::NANDExtractCertificates);

  m_boot_sysmenu->setEnabled(false);

  connect(&Settings::Instance(), &Settings::NANDRefresh, [this] { UpdateToolsMenu(false); });

  m_perform_online_update_menu = tools_menu->addMenu(tr("Perform Online System Update"));
  m_perform_online_update_for_current_region =
      AddAction(m_perform_online_update_menu, tr("Current Region"), this,
                [this] { emit PerformOnlineUpdate(""); });
  m_perform_online_update_menu->addSeparator();
  AddAction(m_perform_online_update_menu, tr("Europe"), this,
            [this] { emit PerformOnlineUpdate("EUR"); });
  AddAction(m_perform_online_update_menu, tr("Japan"), this,
            [this] { emit PerformOnlineUpdate("JPN"); });
  AddAction(m_perform_online_update_menu, tr("Korea"), this,
            [this] { emit PerformOnlineUpdate("KOR"); });
  AddAction(m_perform_online_update_menu, tr("United States"), this,
            [this] { emit PerformOnlineUpdate("USA"); });
}