diff --git a/.reuse/dep5 b/.reuse/dep5 index a46ed270..88c3e996 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -15,9 +15,9 @@ Files: CMakeSettings.json documents/Screenshots/Undertale.png documents/Screenshots/We are DOOMED.png scripts/ps4_names.txt + src/images/PS4_controller_scheme.png src/images/about_icon.png src/images/controller_icon.png - src/images/keyboard_icon.png src/images/exit_icon.png src/images/file_icon.png src/images/flag_china.png diff --git a/src/images/PS4_controller_scheme.png b/src/images/PS4_controller_scheme.png new file mode 100644 index 00000000..9e095a06 Binary files /dev/null and b/src/images/PS4_controller_scheme.png differ diff --git a/src/images/PS4_controller_scheme_final.svg b/src/images/PS4_controller_scheme_final.svg deleted file mode 100644 index 475dc22c..00000000 --- a/src/images/PS4_controller_scheme_final.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/images/keyboard_icon.png b/src/images/keyboard_icon.png deleted file mode 100644 index facf8ef8..00000000 Binary files a/src/images/keyboard_icon.png and /dev/null differ diff --git a/src/qt_gui/keyboardcontrolswindow.ui b/src/qt_gui/keyboardcontrolswindow.ui index da0ecd1b..7973e0c5 100644 --- a/src/qt_gui/keyboardcontrolswindow.ui +++ b/src/qt_gui/keyboardcontrolswindow.ui @@ -10,8 +10,8 @@ SPDX-License-Identifier: GPL-2.0-or-later 0 0 - 1148 - 731 + 1155 + 790 @@ -28,398 +28,410 @@ SPDX-License-Identifier: GPL-2.0-or-later - 1148 - 731 + 1155 + 790 - Configure Keyboard Bindings + Configure Controller Bindings true - + - 0 - 0 - 1151 - 722 + 10 + 10 + 1131 + 711 - - - - 170 - 50 - 870 - 522 - - - - false - - - QWidget { - background-image: url(:/images/PS4_controller_scheme_final.svg); - background-repeat: no-repeat; - background-position: center; -} - - + + 0 + + + + Port 1 + + - 550 - 0 - 71 - 40 + -10 + 20 + 1131 + 621 - - 1 - - - - - - 260 - 0 - 71 - 40 - - - - 1 - - - - - - 280 - 480 - 71 - 40 - - - - 1 - - - - - - 240 - 440 - 71 - 40 - - - - 1 - - - - - - 280 - 400 - 71 - 40 - - - - 1 - - - - - - 320 - 440 - 71 - 40 - - - - 1 - - - - - - 400 - 400 - 71 - 40 - - - - 1 - - - - - - 520 - 480 - 71 - 40 - - - - 1 - - - - - - 480 - 440 - 71 - 40 - - - - 1 - - - - - - 520 - 400 - 71 - 40 - - - - 1 - - - - - - 560 - 440 - 71 - 40 - - - - 1 - + + + + 170 + 50 + 870 + 522 + + + + false + + + QWidget { background-image: url(:images/PS4_controller_scheme.png); + background-repeat: no-repeat; + background-position: center; } + + + + + + 550 + 0 + 71 + 40 + + + + 1 + + + + + + 260 + 0 + 71 + 40 + + + + 1 + + + + + + 280 + 480 + 71 + 40 + + + + 1 + + + + + + 240 + 440 + 71 + 40 + + + + 1 + + + + + + 280 + 400 + 71 + 40 + + + + 1 + + + + + + 320 + 440 + 71 + 40 + + + + 1 + + + + + + 400 + 400 + 71 + 40 + + + + 1 + + + + + + 520 + 480 + 71 + 40 + + + + 1 + + + + + + 480 + 440 + 71 + 40 + + + + 1 + + + + + + 520 + 400 + 71 + 40 + + + + 1 + + + + + + 560 + 440 + 71 + 40 + + + + 1 + + + + + + + 10 + 230 + 71 + 40 + + + + 1 + + + + + + 90 + 230 + 71 + 40 + + + + 1 + + + + + + 50 + 190 + 71 + 40 + + + + 1 + + + + + + 50 + 270 + 71 + 40 + + + + 1 + + + + + + 90 + 40 + 71 + 40 + + + + 1 + + + + + + 90 + 110 + 71 + 40 + + + + 1 + + + + + true + + + + 1050 + 380 + 71 + 40 + + + + 1 + + + + + true + + + + 1050 + 30 + 71 + 40 + + + + 1 + + + + + true + + + + 1050 + 240 + 71 + 40 + + + + 1 + + + + + true + + + + 1050 + 100 + 71 + 40 + + + + 1 + + + + + true + + + + 1050 + 310 + 71 + 40 + + + + 1 + + + + + true + + + + 1050 + 170 + 71 + 40 + + + + 1 + + - - - - 10 - 230 - 71 - 40 - - - - 1 - - - - - - 90 - 230 - 71 - 40 - - - - 1 - - - - - - 50 - 190 - 71 - 40 - - - - 1 - - - - - - 50 - 270 - 71 - 40 - - - - 1 - - - - - - 90 - 40 - 71 - 40 - - - - 1 - - - - - - 90 - 110 - 71 - 40 - - - - 1 - - - - - true - - - - 1050 - 380 - 71 - 40 - - - - 1 - - - - - true - - - - 1050 - 30 - 71 - 40 - - - - 1 - - - - - true - - - - 1050 - 240 - 71 - 40 - - - - 1 - - - - - true - - - - 1050 - 100 - 71 - 40 - - - - 1 - - - - - true - - - - 1050 - 310 - 71 - 40 - - - - 1 - - - - - true - - - - 1050 - 170 - 71 - 40 - - - - 1 - - - - - - 890 - 670 - 100 - 32 - - - - Cancel - - - - - - 1000 - 670 - 100 - 32 - - - - Apply - + + + Port 2 + - + - 0 - 0 - 20 - 22 + 1030 + 740 + 100 + 32 + + Apply + + + + + + 890 + 740 + 100 + 32 + + + + Cancel + diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index 89f3e856..c3493ed6 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -52,7 +52,7 @@ bool MainWindow::Init() { auto end = std::chrono::steady_clock::now(); auto duration = std::chrono::duration_cast(end - start); statusBar.reset(new QStatusBar); - m_keyboardControlsDialog.reset(new KeyboardControlsWindow()); + m_controllerControlsDialog.reset(new KeyboardControlsWindow()); this->setStatusBar(statusBar.data()); // Update status bar int numGames = m_game_info->m_games.size(); @@ -92,11 +92,10 @@ void MainWindow::AddUiWidgets() { ui->toolBar->addWidget(ui->pauseButton); ui->toolBar->addWidget(ui->stopButton); ui->toolBar->addWidget(ui->settingsButton); - ui->toolBar->addWidget(ui->controllerButton); - auto connection = QObject::connect(ui->keyboardButton, &QPushButton::clicked, this, - &MainWindow::KeyboardConfigurationButtonPressed); + auto connection = QObject::connect(ui->controllerButton, &QPushButton::clicked, this, + &MainWindow::ControllerConfigurationButtonPressed); - ui->toolBar->addWidget(ui->keyboardButton); + ui->toolBar->addWidget(ui->controllerButton); QFrame* line = new QFrame(this); line->setFrameShape(QFrame::StyledPanel); line->setFrameShadow(QFrame::Sunken); @@ -105,8 +104,8 @@ void MainWindow::AddUiWidgets() { ui->toolBar->addWidget(ui->mw_searchbar); } -void MainWindow::KeyboardConfigurationButtonPressed() { - m_keyboardControlsDialog->show(); +void MainWindow::ControllerConfigurationButtonPressed() { + m_controllerControlsDialog->show(); } void MainWindow::CreateDockWindows() { @@ -660,7 +659,7 @@ void MainWindow::InstallDirectory() { } std::map MainWindow::getKeysMapping() { - return m_keyboardControlsDialog->getKeysMapping(); + return m_controllerControlsDialog->getKeysMapping(); } void MainWindow::SetLastUsedTheme() { @@ -738,7 +737,6 @@ void MainWindow::SetUiIcons(bool isWhite) { ui->stopButton->setIcon(RecolorIcon(ui->stopButton->icon(), isWhite)); ui->settingsButton->setIcon(RecolorIcon(ui->settingsButton->icon(), isWhite)); ui->controllerButton->setIcon(RecolorIcon(ui->controllerButton->icon(), isWhite)); - ui->keyboardButton->setIcon(RecolorIcon(ui->keyboardButton->icon(), isWhite)); ui->refreshGameListAct->setIcon(RecolorIcon(ui->refreshGameListAct->icon(), isWhite)); ui->menuGame_List_Mode->setIcon(RecolorIcon(ui->menuGame_List_Mode->icon(), isWhite)); ui->pkgViewerAct->setIcon(RecolorIcon(ui->pkgViewerAct->icon(), isWhite)); diff --git a/src/qt_gui/main_window.h b/src/qt_gui/main_window.h index a402dc76..49ce9fab 100644 --- a/src/qt_gui/main_window.h +++ b/src/qt_gui/main_window.h @@ -51,7 +51,7 @@ private Q_SLOTS: void ShowGameList(); void RefreshGameTable(); void HandleResize(QResizeEvent* event); - void KeyboardConfigurationButtonPressed(); + void ControllerConfigurationButtonPressed(); private: Ui_MainWindow* ui; @@ -86,7 +86,7 @@ private: QScopedPointer m_elf_viewer; // Status Bar. QScopedPointer statusBar; - QScopedPointer m_keyboardControlsDialog; + QScopedPointer m_controllerControlsDialog; // Available GPU devices std::vector m_physical_devices; diff --git a/src/qt_gui/main_window_ui.h b/src/qt_gui/main_window_ui.h index c50524c3..7d0c58dd 100644 --- a/src/qt_gui/main_window_ui.h +++ b/src/qt_gui/main_window_ui.h @@ -59,7 +59,6 @@ public: QPushButton* stopButton; QPushButton* settingsButton; QPushButton* controllerButton; - QPushButton* keyboardButton; QWidget* sizeSliderContainer; QHBoxLayout* sizeSliderContainer_layout; @@ -203,10 +202,6 @@ public: controllerButton->setFlat(true); controllerButton->setIcon(QIcon(":images/controller_icon.png")); controllerButton->setIconSize(QSize(40, 40)); - keyboardButton = new QPushButton(centralWidget); - keyboardButton->setFlat(true); - keyboardButton->setIcon(QIcon(":images/keyboard_icon.png")); - keyboardButton->setIconSize(QSize(40, 40)); sizeSliderContainer = new QWidget(centralWidget); sizeSliderContainer->setObjectName("sizeSliderContainer"); diff --git a/src/shadps4.qrc b/src/shadps4.qrc index 39705a02..00f51bc6 100644 --- a/src/shadps4.qrc +++ b/src/shadps4.qrc @@ -14,8 +14,7 @@ images/exit_icon.png images/settings_icon.png images/controller_icon.png - images/keyboard_icon.png - images/PS4_controller_scheme_final.svg + images/PS4_controller_scheme.png images/refresh_icon.png images/list_mode_icon.png images/flag_jp.png