diff options
author | shinyquagsire23 <mtinc2@gmail.com> | 2018-01-15 09:35:53 +0100 |
---|---|---|
committer | shinyquagsire23 <mtinc2@gmail.com> | 2018-01-15 10:30:53 +0100 |
commit | aa4fa8bded307f5472b7934c37b15bd096b99ca1 (patch) | |
tree | 042c7729a62c2c316d8869eef23942713e724667 | |
parent | settings: Screenshot button (diff) | |
download | yuzu-aa4fa8bded307f5472b7934c37b15bd096b99ca1.tar yuzu-aa4fa8bded307f5472b7934c37b15bd096b99ca1.tar.gz yuzu-aa4fa8bded307f5472b7934c37b15bd096b99ca1.tar.bz2 yuzu-aa4fa8bded307f5472b7934c37b15bd096b99ca1.tar.lz yuzu-aa4fa8bded307f5472b7934c37b15bd096b99ca1.tar.xz yuzu-aa4fa8bded307f5472b7934c37b15bd096b99ca1.tar.zst yuzu-aa4fa8bded307f5472b7934c37b15bd096b99ca1.zip |
-rw-r--r-- | src/yuzu/configuration/config.cpp | 10 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_input.cpp | 18 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_input.ui | 283 |
3 files changed, 221 insertions, 90 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 4c713fcbc..9ce851d17 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -19,16 +19,18 @@ Config::Config() { } const std::array<int, Settings::NativeButton::NumButtons> Config::default_buttons = { - Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, Qt::Key_T, Qt::Key_G, Qt::Key_F, Qt::Key_H, - Qt::Key_Q, Qt::Key_W, Qt::Key_M, Qt::Key_N, Qt::Key_1, Qt::Key_2, Qt::Key_B, + Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, Qt::Key_3, Qt::Key_4, Qt::Key_Q, Qt::Key_W, + Qt::Key_1, Qt::Key_2, Qt::Key_N, Qt::Key_M, Qt::Key_F, Qt::Key_T, Qt::Key_H, Qt::Key_G, + Qt::Key_Left, Qt::Key_Up, Qt::Key_Right, Qt::Key_Down, Qt::Key_J, Qt::Key_I, Qt::Key_L, + Qt::Key_K, Qt::Key_D, Qt::Key_C, Qt::Key_B, Qt::Key_V, }; const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> Config::default_analogs{{ { - Qt::Key_Up, Qt::Key_Down, Qt::Key_Left, Qt::Key_Right, Qt::Key_D, + Qt::Key_Up, Qt::Key_Down, Qt::Key_Left, Qt::Key_Right, Qt::Key_E, }, { - Qt::Key_I, Qt::Key_K, Qt::Key_J, Qt::Key_L, Qt::Key_D, + Qt::Key_I, Qt::Key_K, Qt::Key_J, Qt::Key_L, Qt::Key_R, }, }}; diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index 4c2a3e738..d92a1fed9 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp @@ -54,19 +54,23 @@ ConfigureInput::ConfigureInput(QWidget* parent) setFocusPolicy(Qt::ClickFocus); button_map = { - ui->buttonA, ui->buttonB, ui->buttonX, ui->buttonY, ui->buttonDpadUp, - ui->buttonDpadDown, ui->buttonDpadLeft, ui->buttonDpadRight, ui->buttonL, ui->buttonR, - ui->buttonStart, ui->buttonSelect, ui->buttonZL, ui->buttonZR, ui->buttonHome, + ui->buttonA, ui->buttonB, ui->buttonX, ui->buttonY, + ui->buttonLStick, ui->buttonRStick, ui->buttonL, ui->buttonR, + ui->buttonZL, ui->buttonZR, ui->buttonPlus, ui->buttonMinus, + ui->buttonDpadLeft, ui->buttonDpadUp, ui->buttonDpadRight, ui->buttonDpadDown, + ui->buttonLStickLeft, ui->buttonLStickUp, ui->buttonLStickRight, ui->buttonLStickDown, + ui->buttonRStickLeft, ui->buttonRStickUp, ui->buttonRStickRight, ui->buttonRStickDown, + ui->buttonSL, ui->buttonSR, ui->buttonHome, ui->buttonScreenshot, }; analog_map = {{ { - ui->buttonCircleUp, ui->buttonCircleDown, ui->buttonCircleLeft, ui->buttonCircleRight, - ui->buttonCircleMod, + ui->buttonLStickUp, ui->buttonLStickDown, ui->buttonLStickLeft, ui->buttonLStickRight, + ui->buttonLStickMod, }, { - ui->buttonCStickUp, ui->buttonCStickDown, ui->buttonCStickLeft, ui->buttonCStickRight, - nullptr, + ui->buttonRStickUp, ui->buttonRStickDown, ui->buttonRStickLeft, ui->buttonRStickRight, + ui->buttonRStickMod, }, }}; diff --git a/src/yuzu/configuration/configure_input.ui b/src/yuzu/configuration/configure_input.ui index 2760787e5..5143c9d72 100644 --- a/src/yuzu/configuration/configure_input.ui +++ b/src/yuzu/configuration/configure_input.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>370</width> - <height>534</height> + <width>343</width> + <height>665</height> </rect> </property> <property name="windowTitle"> @@ -190,7 +190,108 @@ </layout> </widget> </item> - <item row="1" column="0"> + <item row="3" column="1"> + <widget class="QGroupBox" name="faceButtons_6"> + <property name="title"> + <string>Misc.</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + <property name="checkable"> + <bool>false</bool> + </property> + <layout class="QGridLayout" name="gridLayout_6"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_25"> + <item> + <widget class="QLabel" name="label_29"> + <property name="text"> + <string>Plus:</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="buttonPlus"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_26"> + <item> + <widget class="QLabel" name="label_30"> + <property name="text"> + <string>Minus:</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="buttonMinus"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="1" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_27"> + <item> + <widget class="QLabel" name="label_31"> + <property name="text"> + <string>Home:</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="buttonHome"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="1" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_28"> + <item> + <widget class="QLabel" name="label_11"> + <property name="text"> + <string>Screen +Capture:</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="buttonScreenshot"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="1"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item row="3" column="0"> <widget class="QGroupBox" name="faceButtons_3"> <property name="title"> <string>Shoulder Buttons</string> @@ -274,13 +375,49 @@ </item> </layout> </item> + <item row="2" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_8"> + <item> + <widget class="QLabel" name="label_7"> + <property name="text"> + <string>SL:</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="buttonSL"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_29"> + <item> + <widget class="QLabel" name="label_8"> + <property name="text"> + <string>SR:</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="buttonSR"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> </layout> </widget> </item> - <item row="1" column="1"> + <item row="1" column="0"> <widget class="QGroupBox" name="faceButtons_4"> <property name="title"> - <string>Circle Pad</string> + <string>Left Stick</string> </property> <property name="flat"> <bool>false</bool> @@ -299,7 +436,7 @@ </widget> </item> <item> - <widget class="QPushButton" name="buttonCircleLeft"> + <widget class="QPushButton" name="buttonLStickLeft"> <property name="text"> <string/> </property> @@ -317,7 +454,7 @@ </widget> </item> <item> - <widget class="QPushButton" name="buttonCircleRight"> + <widget class="QPushButton" name="buttonLStickRight"> <property name="text"> <string/> </property> @@ -335,7 +472,7 @@ </widget> </item> <item> - <widget class="QPushButton" name="buttonCircleUp"> + <widget class="QPushButton" name="buttonLStickUp"> <property name="text"> <string/> </property> @@ -353,7 +490,7 @@ </widget> </item> <item> - <widget class="QPushButton" name="buttonCircleDown"> + <widget class="QPushButton" name="buttonLStickDown"> <property name="text"> <string/> </property> @@ -361,32 +498,17 @@ </item> </layout> </item> - </layout> - </widget> - </item> - <item row="2" column="0"> - <widget class="QGroupBox" name="faceButtons_5"> - <property name="title"> - <string>C-Stick</string> - </property> - <property name="flat"> - <bool>false</bool> - </property> - <property name="checkable"> - <bool>false</bool> - </property> - <layout class="QGridLayout" name="gridLayout_5"> - <item row="0" column="0"> - <layout class="QVBoxLayout" name="verticalLayout_21"> + <item row="2" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_7" stretch="0,0"> <item> - <widget class="QLabel" name="label_25"> + <widget class="QLabel" name="label_6"> <property name="text"> - <string>Left:</string> + <string>Pressed:</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="buttonCStickLeft"> + <widget class="QPushButton" name="buttonLStick"> <property name="text"> <string/> </property> @@ -394,17 +516,17 @@ </item> </layout> </item> - <item row="0" column="1"> - <layout class="QVBoxLayout" name="verticalLayout_22"> + <item row="2" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_31"> <item> - <widget class="QLabel" name="label_27"> + <widget class="QLabel" name="label_9"> <property name="text"> - <string>Right:</string> + <string>Modifier:</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="buttonCStickRight"> + <widget class="QPushButton" name="buttonLStickMod"> <property name="text"> <string/> </property> @@ -412,17 +534,35 @@ </item> </layout> </item> - <item row="1" column="0"> - <layout class="QVBoxLayout" name="verticalLayout_23"> + </layout> + </widget> + </item> + <item row="1" column="1"> + <widget class="QGroupBox" name="faceButtons_5"> + <property name="title"> + <string>Right Stick</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="flat"> + <bool>false</bool> + </property> + <property name="checkable"> + <bool>false</bool> + </property> + <layout class="QGridLayout" name="gridLayout_5"> + <item row="1" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_24"> <item> - <widget class="QLabel" name="label_28"> + <widget class="QLabel" name="label_26"> <property name="text"> - <string>Up:</string> + <string>Down:</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="buttonCStickUp"> + <widget class="QPushButton" name="buttonRStickDown"> <property name="text"> <string/> </property> @@ -430,17 +570,17 @@ </item> </layout> </item> - <item row="1" column="1"> - <layout class="QVBoxLayout" name="verticalLayout_24"> + <item row="0" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_22"> <item> - <widget class="QLabel" name="label_26"> + <widget class="QLabel" name="label_27"> <property name="text"> - <string>Down:</string> + <string>Right:</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="buttonCStickDown"> + <widget class="QPushButton" name="buttonRStickRight"> <property name="text"> <string/> </property> @@ -448,32 +588,17 @@ </item> </layout> </item> - </layout> - </widget> - </item> - <item row="2" column="1"> - <widget class="QGroupBox" name="faceButtons_6"> - <property name="title"> - <string>Misc.</string> - </property> - <property name="flat"> - <bool>false</bool> - </property> - <property name="checkable"> - <bool>false</bool> - </property> - <layout class="QGridLayout" name="gridLayout_6"> - <item row="0" column="0"> - <layout class="QVBoxLayout" name="verticalLayout_25"> + <item row="1" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_23"> <item> - <widget class="QLabel" name="label_29"> + <widget class="QLabel" name="label_28"> <property name="text"> - <string>Start:</string> + <string>Up:</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="buttonStart"> + <widget class="QPushButton" name="buttonRStickUp"> <property name="text"> <string/> </property> @@ -481,17 +606,17 @@ </item> </layout> </item> - <item row="0" column="1"> - <layout class="QVBoxLayout" name="verticalLayout_26"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_21"> <item> - <widget class="QLabel" name="label_30"> + <widget class="QLabel" name="label_25"> <property name="text"> - <string>Select:</string> + <string>Left:</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="buttonSelect"> + <widget class="QPushButton" name="buttonRStickLeft"> <property name="text"> <string/> </property> @@ -499,17 +624,17 @@ </item> </layout> </item> - <item row="1" column="0"> - <layout class="QVBoxLayout" name="verticalLayout_27"> + <item row="2" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_32"> <item> - <widget class="QLabel" name="label_31"> + <widget class="QLabel" name="label_10"> <property name="text"> - <string>Home:</string> + <string>Modifier:</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="buttonHome"> + <widget class="QPushButton" name="buttonRStickMod"> <property name="text"> <string/> </property> @@ -517,17 +642,17 @@ </item> </layout> </item> - <item row="1" column="1"> - <layout class="QVBoxLayout" name="verticalLayout_28"> + <item row="2" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_6"> <item> - <widget class="QLabel" name="label_36"> + <widget class="QLabel" name="label_5"> <property name="text"> - <string>Circle Mod:</string> + <string>Pressed:</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="buttonCircleMod"> + <widget class="QPushButton" name="buttonRStick"> <property name="text"> <string/> </property> |