mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-25 11:56:18 +00:00
Update gui with new touchpad inputs (#3125)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* Update gui with new touchpad inputs * Update kbm_gui.ui --------- Co-authored-by: rainmakerv2 <josefkarloprado@gmail.com>
This commit is contained in:
parent
551751df3c
commit
7b0249d9ca
3 changed files with 157 additions and 68 deletions
|
@ -39,14 +39,28 @@ private:
|
|||
"pad_left", "pad_right", "axis_left_x", "axis_left_y", "axis_right_x",
|
||||
"axis_right_y", "back"};
|
||||
|
||||
const QStringList ButtonOutputs = {"cross", "circle", "square", "triangle", "l1",
|
||||
"r1", "l2", "r2", "l3",
|
||||
const QStringList ButtonOutputs = {"cross",
|
||||
"circle",
|
||||
"square",
|
||||
"triangle",
|
||||
"l1",
|
||||
"r1",
|
||||
"l2",
|
||||
"r2",
|
||||
"l3",
|
||||
|
||||
"r3", "options", "pad_up",
|
||||
"r3",
|
||||
"options",
|
||||
"pad_up",
|
||||
|
||||
"pad_down",
|
||||
|
||||
"pad_left", "pad_right", "touchpad", "unmapped"};
|
||||
"pad_left",
|
||||
"pad_right",
|
||||
"touchpad_left",
|
||||
"touchpad_center",
|
||||
"touchpad_right",
|
||||
"unmapped"};
|
||||
|
||||
const QStringList StickOutputs = {"axis_left_x", "axis_left_y", "axis_right_x", "axis_right_y",
|
||||
"unmapped"};
|
||||
|
|
|
@ -32,14 +32,34 @@ KBMSettings::KBMSettings(std::shared_ptr<GameInfoClass> game_info_get, QWidget*
|
|||
ui->ProfileComboBox->addItem(QString::fromStdString(m_game_info->m_games[i].serial));
|
||||
}
|
||||
|
||||
ButtonsList = {
|
||||
ui->CrossButton, ui->CircleButton, ui->TriangleButton, ui->SquareButton,
|
||||
ui->L1Button, ui->R1Button, ui->L2Button, ui->R2Button,
|
||||
ui->L3Button, ui->R3Button, ui->OptionsButton, ui->TouchpadButton,
|
||||
ui->DpadUpButton, ui->DpadDownButton, ui->DpadLeftButton, ui->DpadRightButton,
|
||||
ui->LStickUpButton, ui->LStickDownButton, ui->LStickLeftButton, ui->LStickRightButton,
|
||||
ui->RStickUpButton, ui->RStickDownButton, ui->RStickLeftButton, ui->RStickRightButton,
|
||||
ui->LHalfButton, ui->RHalfButton};
|
||||
ButtonsList = {ui->CrossButton,
|
||||
ui->CircleButton,
|
||||
ui->TriangleButton,
|
||||
ui->SquareButton,
|
||||
ui->L1Button,
|
||||
ui->R1Button,
|
||||
ui->L2Button,
|
||||
ui->R2Button,
|
||||
ui->L3Button,
|
||||
ui->R3Button,
|
||||
ui->OptionsButton,
|
||||
ui->TouchpadLeftButton,
|
||||
ui->TouchpadCenterButton,
|
||||
ui->TouchpadRightButton,
|
||||
ui->DpadUpButton,
|
||||
ui->DpadDownButton,
|
||||
ui->DpadLeftButton,
|
||||
ui->DpadRightButton,
|
||||
ui->LStickUpButton,
|
||||
ui->LStickDownButton,
|
||||
ui->LStickLeftButton,
|
||||
ui->LStickRightButton,
|
||||
ui->RStickUpButton,
|
||||
ui->RStickDownButton,
|
||||
ui->RStickLeftButton,
|
||||
ui->RStickRightButton,
|
||||
ui->LHalfButton,
|
||||
ui->RHalfButton};
|
||||
|
||||
ButtonConnects();
|
||||
SetUIValuestoMappings("default");
|
||||
|
@ -249,12 +269,23 @@ void KBMSettings::SaveKBMConfig(bool CloseOnSave) {
|
|||
if (input_string != "unmapped")
|
||||
inputs.push_back(input_string);
|
||||
|
||||
input_string = ui->TouchpadButton->text().toStdString();
|
||||
output_string = "touchpad";
|
||||
input_string = ui->TouchpadLeftButton->text().toStdString();
|
||||
output_string = "touchpad_left";
|
||||
lines.push_back(output_string + " = " + input_string);
|
||||
if (input_string != "unmapped")
|
||||
inputs.push_back(input_string);
|
||||
|
||||
input_string = ui->TouchpadCenterButton->text().toStdString();
|
||||
output_string = "touchpad_center";
|
||||
lines.push_back(output_string + " = " + input_string);
|
||||
if (input_string != "unmapped")
|
||||
inputs.push_back(input_string);
|
||||
|
||||
input_string = ui->TouchpadRightButton->text().toStdString();
|
||||
output_string = "touchpad_right";
|
||||
lines.push_back(output_string + " = " + input_string);
|
||||
if (input_string != "unmapped")
|
||||
inputs.push_back(input_string);
|
||||
lines.push_back("");
|
||||
|
||||
input_string = ui->LStickUpButton->text().toStdString();
|
||||
|
@ -432,7 +463,9 @@ void KBMSettings::SetDefault() {
|
|||
ui->R2Button->setText("o");
|
||||
ui->R3Button->setText("m");
|
||||
|
||||
ui->TouchpadButton->setText("space");
|
||||
ui->TouchpadLeftButton->setText("space");
|
||||
ui->TouchpadCenterButton->setText("unmapped");
|
||||
ui->TouchpadRightButton->setText("unmapped");
|
||||
ui->OptionsButton->setText("enter");
|
||||
|
||||
ui->DpadUpButton->setText("up");
|
||||
|
@ -512,8 +545,12 @@ void KBMSettings::SetUIValuestoMappings(std::string config_id) {
|
|||
ui->DpadRightButton->setText(QString::fromStdString(input_string));
|
||||
} else if (output_string == "options") {
|
||||
ui->OptionsButton->setText(QString::fromStdString(input_string));
|
||||
} else if (output_string == "touchpad") {
|
||||
ui->TouchpadButton->setText(QString::fromStdString(input_string));
|
||||
} else if (output_string == "touchpad_left") {
|
||||
ui->TouchpadLeftButton->setText(QString::fromStdString(input_string));
|
||||
} else if (output_string == "touchpad_center") {
|
||||
ui->TouchpadCenterButton->setText(QString::fromStdString(input_string));
|
||||
} else if (output_string == "touchpad_right") {
|
||||
ui->TouchpadRightButton->setText(QString::fromStdString(input_string));
|
||||
} else if (output_string == "axis_left_x_minus") {
|
||||
ui->LStickLeftButton->setText(QString::fromStdString(input_string));
|
||||
} else if (output_string == "axis_left_x_plus") {
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1234</width>
|
||||
<height>796</height>
|
||||
<width>1235</width>
|
||||
<height>842</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -44,8 +44,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1214</width>
|
||||
<height>746</height>
|
||||
<width>1215</width>
|
||||
<height>792</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
|
@ -54,7 +54,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1211</width>
|
||||
<height>741</height>
|
||||
<height>791</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="RemapLayout">
|
||||
|
@ -793,7 +793,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="layout_system_buttons" stretch="0">
|
||||
<layout class="QVBoxLayout" name="layout_system_buttons" stretch="0,0">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="sizePolicy">
|
||||
|
@ -825,8 +825,11 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumHeight">
|
||||
<number>48</number>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::FocusPolicy::NoFocus</enum>
|
||||
|
@ -844,8 +847,11 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumHeight">
|
||||
<number>48</number>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::FocusPolicy::NoFocus</enum>
|
||||
|
@ -858,6 +864,55 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_options">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="gb_start_layout">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="OptionsButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::FocusPolicy::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>unmapped</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -1067,34 +1122,13 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_touchpad">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="gb_touchpadleft">
|
||||
<property name="title">
|
||||
<string>Touchpad Click</string>
|
||||
<string>Touchpad Left</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||
<item>
|
||||
<widget class="QPushButton" name="TouchpadButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::FocusPolicy::NoFocus</enum>
|
||||
</property>
|
||||
<widget class="QPushButton" name="TouchpadLeftButton">
|
||||
<property name="text">
|
||||
<string>unmapped</string>
|
||||
</property>
|
||||
|
@ -1150,6 +1184,22 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_touchpadcenter">
|
||||
<property name="title">
|
||||
<string>Touchpad Center</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||
<item>
|
||||
<widget class="QPushButton" name="TouchpadCenterButton">
|
||||
<property name="text">
|
||||
<string>unmapped</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -1204,7 +1254,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_options">
|
||||
<widget class="QGroupBox" name="gb_touchpadright">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -1218,23 +1268,11 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Options</string>
|
||||
<string>Touchpad Right</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="gb_start_layout">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="OptionsButton">
|
||||
<widget class="QPushButton" name="TouchpadRightButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue