Qt: Add pause menu hotkey to setup wizard

This commit is contained in:
Stenzek
2026-07-03 01:39:34 +10:00
parent bb3fede3f2
commit 9c1500f1ac
2 changed files with 73 additions and 9 deletions
+3
View File
@@ -429,6 +429,9 @@ void SetupWizardDialog::setupControllerPage(bool initial)
for (const PadWidgets& w : pad_widgets)
w.type_combo->blockSignals(false);
}
m_ui.pauseMenuHotkey->initialize(nullptr, InputBindingInfo::Type::Button, "Hotkeys", "OpenPauseMenu",
tr("Open Pause Menu"));
}
void SetupWizardDialog::updateStylesheets()
+70 -9
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>760</width>
<height>480</height>
<height>498</height>
</rect>
</property>
<property name="windowTitle">
@@ -148,8 +148,8 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
@@ -605,7 +605,7 @@
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By default, DuckStation will map your keyboard to the virtual controller.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:700;&quot;&gt;To use an external controller, you must map it first. &lt;/span&gt;On this screen, you can automatically map any controller which is currently connected. If your controller is not currently connected, you can plug it in now.&lt;/p&gt;&lt;p&gt;To change controller bindings in more detail, or use multi-tap, open the Settings menu and choose Controllers once you have completed the Setup Wizard.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By default, DuckStation will map your keyboard to the virtual controller. &lt;span style=&quot; font-weight:700;&quot;&gt;To use an external controller, you must map it first. &lt;/span&gt;On this screen, you can automatically map any controller which is currently connected. If your controller is not currently connected, you can plug it in now.&lt;/p&gt;&lt;p&gt;To change controller bindings in more detail, or use multi-tap, open the Settings menu and choose Controllers once you have completed the Setup Wizard.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -734,6 +734,61 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Pause Menu Hotkey</string>
</property>
<layout class="QGridLayout" name="gridLayout_9" columnstretch="0,1,0">
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Pressing this key will open the pause menu when ingame, allowing you to load/save state, change settings, and perform other functions without needing to use a mouse. Click the button to change the trigger.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="InputBindingWidget" name="pauseMenuHotkey">
<property name="maximumSize">
<size>
<width>250</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
@@ -1354,16 +1409,22 @@ You can change this option at a later time by using the toolbar in Desktop Mode
</layout>
</widget>
<customwidgets>
<customwidget>
<class>AnimatedStackedWidget</class>
<extends>QStackedWidget</extends>
<header>animatedstackedwidget.h</header>
</customwidget>
<customwidget>
<class>CardRadioButton</class>
<extends>QRadioButton</extends>
<header>cardradiobutton.h</header>
</customwidget>
<customwidget>
<class>AnimatedStackedWidget</class>
<extends>QStackedWidget</extends>
<header>animatedstackedwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>InputBindingWidget</class>
<extends>QPushButton</extends>
<header>inputbindingwidgets.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="resources/duckstation-qt.qrc"/>