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",
|
"pad_left", "pad_right", "axis_left_x", "axis_left_y", "axis_right_x",
|
||||||
"axis_right_y", "back"};
|
"axis_right_y", "back"};
|
||||||
|
|
||||||
const QStringList ButtonOutputs = {"cross", "circle", "square", "triangle", "l1",
|
const QStringList ButtonOutputs = {"cross",
|
||||||
"r1", "l2", "r2", "l3",
|
"circle",
|
||||||
|
"square",
|
||||||
|
"triangle",
|
||||||
|
"l1",
|
||||||
|
"r1",
|
||||||
|
"l2",
|
||||||
|
"r2",
|
||||||
|
"l3",
|
||||||
|
|
||||||
"r3", "options", "pad_up",
|
"r3",
|
||||||
|
"options",
|
||||||
|
"pad_up",
|
||||||
|
|
||||||
"pad_down",
|
"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",
|
const QStringList StickOutputs = {"axis_left_x", "axis_left_y", "axis_right_x", "axis_right_y",
|
||||||
"unmapped"};
|
"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));
|
ui->ProfileComboBox->addItem(QString::fromStdString(m_game_info->m_games[i].serial));
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonsList = {
|
ButtonsList = {ui->CrossButton,
|
||||||
ui->CrossButton, ui->CircleButton, ui->TriangleButton, ui->SquareButton,
|
ui->CircleButton,
|
||||||
ui->L1Button, ui->R1Button, ui->L2Button, ui->R2Button,
|
ui->TriangleButton,
|
||||||
ui->L3Button, ui->R3Button, ui->OptionsButton, ui->TouchpadButton,
|
ui->SquareButton,
|
||||||
ui->DpadUpButton, ui->DpadDownButton, ui->DpadLeftButton, ui->DpadRightButton,
|
ui->L1Button,
|
||||||
ui->LStickUpButton, ui->LStickDownButton, ui->LStickLeftButton, ui->LStickRightButton,
|
ui->R1Button,
|
||||||
ui->RStickUpButton, ui->RStickDownButton, ui->RStickLeftButton, ui->RStickRightButton,
|
ui->L2Button,
|
||||||
ui->LHalfButton, ui->RHalfButton};
|
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();
|
ButtonConnects();
|
||||||
SetUIValuestoMappings("default");
|
SetUIValuestoMappings("default");
|
||||||
|
@ -249,12 +269,23 @@ void KBMSettings::SaveKBMConfig(bool CloseOnSave) {
|
||||||
if (input_string != "unmapped")
|
if (input_string != "unmapped")
|
||||||
inputs.push_back(input_string);
|
inputs.push_back(input_string);
|
||||||
|
|
||||||
input_string = ui->TouchpadButton->text().toStdString();
|
input_string = ui->TouchpadLeftButton->text().toStdString();
|
||||||
output_string = "touchpad";
|
output_string = "touchpad_left";
|
||||||
lines.push_back(output_string + " = " + input_string);
|
lines.push_back(output_string + " = " + input_string);
|
||||||
if (input_string != "unmapped")
|
if (input_string != "unmapped")
|
||||||
inputs.push_back(input_string);
|
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("");
|
lines.push_back("");
|
||||||
|
|
||||||
input_string = ui->LStickUpButton->text().toStdString();
|
input_string = ui->LStickUpButton->text().toStdString();
|
||||||
|
@ -432,7 +463,9 @@ void KBMSettings::SetDefault() {
|
||||||
ui->R2Button->setText("o");
|
ui->R2Button->setText("o");
|
||||||
ui->R3Button->setText("m");
|
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->OptionsButton->setText("enter");
|
||||||
|
|
||||||
ui->DpadUpButton->setText("up");
|
ui->DpadUpButton->setText("up");
|
||||||
|
@ -512,8 +545,12 @@ void KBMSettings::SetUIValuestoMappings(std::string config_id) {
|
||||||
ui->DpadRightButton->setText(QString::fromStdString(input_string));
|
ui->DpadRightButton->setText(QString::fromStdString(input_string));
|
||||||
} else if (output_string == "options") {
|
} else if (output_string == "options") {
|
||||||
ui->OptionsButton->setText(QString::fromStdString(input_string));
|
ui->OptionsButton->setText(QString::fromStdString(input_string));
|
||||||
} else if (output_string == "touchpad") {
|
} else if (output_string == "touchpad_left") {
|
||||||
ui->TouchpadButton->setText(QString::fromStdString(input_string));
|
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") {
|
} else if (output_string == "axis_left_x_minus") {
|
||||||
ui->LStickLeftButton->setText(QString::fromStdString(input_string));
|
ui->LStickLeftButton->setText(QString::fromStdString(input_string));
|
||||||
} else if (output_string == "axis_left_x_plus") {
|
} else if (output_string == "axis_left_x_plus") {
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1234</width>
|
<width>1235</width>
|
||||||
<height>796</height>
|
<height>842</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -44,8 +44,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1214</width>
|
<width>1215</width>
|
||||||
<height>746</height>
|
<height>792</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1211</width>
|
<width>1211</width>
|
||||||
<height>741</height>
|
<height>791</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="RemapLayout">
|
<layout class="QHBoxLayout" name="RemapLayout">
|
||||||
|
@ -793,7 +793,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="layout_system_buttons" stretch="0">
|
<layout class="QVBoxLayout" name="layout_system_buttons" stretch="0,0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_4">
|
<widget class="QGroupBox" name="groupBox_4">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -825,8 +825,11 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumHeight">
|
<property name="minimumSize">
|
||||||
<number>48</number>
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::FocusPolicy::NoFocus</enum>
|
<enum>Qt::FocusPolicy::NoFocus</enum>
|
||||||
|
@ -844,8 +847,11 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumHeight">
|
<property name="minimumSize">
|
||||||
<number>48</number>
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::FocusPolicy::NoFocus</enum>
|
<enum>Qt::FocusPolicy::NoFocus</enum>
|
||||||
|
@ -858,6 +864,55 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -1067,34 +1122,13 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_touchpad">
|
<widget class="QGroupBox" name="gb_touchpadleft">
|
||||||
<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">
|
<property name="title">
|
||||||
<string>Touchpad Click</string>
|
<string>Touchpad Left</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="TouchpadButton">
|
<widget class="QPushButton" name="TouchpadLeftButton">
|
||||||
<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">
|
<property name="text">
|
||||||
<string>unmapped</string>
|
<string>unmapped</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1150,6 +1184,22 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -1204,7 +1254,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_options">
|
<widget class="QGroupBox" name="gb_touchpadright">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -1218,23 +1268,11 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Options</string>
|
<string>Touchpad Right</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="gb_start_layout">
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
<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>
|
<item>
|
||||||
<widget class="QPushButton" name="OptionsButton">
|
<widget class="QPushButton" name="TouchpadRightButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue