mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Qt: Add controller (overview) window
This commit is contained in:
@ -12,9 +12,11 @@
|
||||
#include "Core/Core.h"
|
||||
#include "Core/HW/ProcessorInterface.h"
|
||||
#include "Core/Movie.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
#include "Core/State.h"
|
||||
|
||||
#include "DolphinQt2/AboutDialog.h"
|
||||
#include "DolphinQt2/Config/ControllersWindow.h"
|
||||
#include "DolphinQt2/Config/PathDialog.h"
|
||||
#include "DolphinQt2/Config/SettingsWindow.h"
|
||||
#include "DolphinQt2/Host.h"
|
||||
@ -51,6 +53,7 @@ void MainWindow::CreateComponents()
|
||||
m_render_widget = new RenderWidget;
|
||||
m_stack = new QStackedWidget(this);
|
||||
m_paths_dialog = new PathDialog(this);
|
||||
m_controllers_window = new ControllersWindow(this);
|
||||
m_settings_window = new SettingsWindow(this);
|
||||
}
|
||||
|
||||
@ -90,6 +93,11 @@ void MainWindow::ConnectMenuBar()
|
||||
connect(this, &MainWindow::EmulationStarted, m_menu_bar, &MenuBar::EmulationStarted);
|
||||
connect(this, &MainWindow::EmulationPaused, m_menu_bar, &MenuBar::EmulationPaused);
|
||||
connect(this, &MainWindow::EmulationStopped, m_menu_bar, &MenuBar::EmulationStopped);
|
||||
|
||||
connect(this, &MainWindow::EmulationStarted, this,
|
||||
[=]() { m_controllers_window->OnEmulationStateChanged(true); });
|
||||
connect(this, &MainWindow::EmulationStopped, this,
|
||||
[=]() { m_controllers_window->OnEmulationStateChanged(false); });
|
||||
}
|
||||
|
||||
void MainWindow::ConnectToolBar()
|
||||
@ -103,6 +111,7 @@ void MainWindow::ConnectToolBar()
|
||||
connect(m_tool_bar, &ToolBar::ScreenShotPressed, this, &MainWindow::ScreenShot);
|
||||
connect(m_tool_bar, &ToolBar::PathsPressed, this, &MainWindow::ShowPathsDialog);
|
||||
connect(m_tool_bar, &ToolBar::SettingsPressed, this, &MainWindow::ShowSettingsWindow);
|
||||
connect(m_tool_bar, &ToolBar::ControllersPressed, this, &MainWindow::ShowControllersWindow);
|
||||
|
||||
connect(this, &MainWindow::EmulationStarted, m_tool_bar, &ToolBar::EmulationStarted);
|
||||
connect(this, &MainWindow::EmulationPaused, m_tool_bar, &ToolBar::EmulationPaused);
|
||||
@ -324,6 +333,13 @@ void MainWindow::ShowPathsDialog()
|
||||
m_paths_dialog->activateWindow();
|
||||
}
|
||||
|
||||
void MainWindow::ShowControllersWindow()
|
||||
{
|
||||
m_controllers_window->show();
|
||||
m_controllers_window->raise();
|
||||
m_controllers_window->activateWindow();
|
||||
}
|
||||
|
||||
void MainWindow::ShowSettingsWindow()
|
||||
{
|
||||
m_settings_window->show();
|
||||
|
Reference in New Issue
Block a user