Qt: Move RAIntegration setting to advanced settings

Out of space in the main page...
pull/3732/head
Stenzek 2 months ago
parent 86fd69332e
commit 122bd30ba0
No known key found for this signature in database

@ -145,23 +145,6 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
m_ui.loginBox = nullptr;
}
// RAIntegration is not available on non-win32/x64.
#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
if (Achievements::IsRAIntegrationAvailable())
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.useRAIntegration, "Cheevos", "UseRAIntegration", false);
else
m_ui.useRAIntegration->setEnabled(false);
dialog->registerWidgetHelp(
m_ui.useRAIntegration, tr("Enable RAIntegration (Development Only)"), tr("Unchecked"),
tr("When enabled, DuckStation will load the RAIntegration DLL which allows for achievement development.<br>The "
"RA_Integration.dll file must be placed in the same directory as the DuckStation executable."));
#else
m_ui.settingsLayout->removeWidget(m_ui.useRAIntegration);
delete m_ui.useRAIntegration;
m_ui.useRAIntegration = nullptr;
#endif
updateEnableState();
onAchievementsNotificationDurationSliderChanged();
onLeaderboardsNotificationDurationSliderChanged();
@ -250,6 +233,7 @@ void AchievementSettingsWidget::updateEnableState()
m_ui.spectatorMode->setEnabled(enabled);
m_ui.encoreMode->setEnabled(enabled && !spectator_enabled);
m_ui.unofficialAchievements->setEnabled(enabled);
m_ui.prefetchBadges->setEnabled(enabled);
m_ui.notificationsGroup->setEnabled(enabled);
m_ui.progressTrackingGroup->setEnabled(enabled);

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>598</width>
<height>548</height>
<height>550</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@ -120,9 +120,9 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="useRAIntegration">
<widget class="QCheckBox" name="prefetchBadges">
<property name="text">
<string>Enable RAIntegration (Development Only)</string>
<string>Prefetch Badges</string>
</property>
</widget>
</item>
@ -228,6 +228,13 @@
</layout>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="leaderboardTrackers">
<property name="text">
<string>Show Leaderboard Trackers</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,1">
<property name="spacing">
<number>0</number>
@ -251,13 +258,6 @@
</item>
</layout>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="prefetchBadges">
<property name="text">
<string>Prefetch Badges</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="notificationLocationLabel">
<property name="text">
@ -358,13 +358,6 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="leaderboardTrackers">
<property name="text">
<string>Show Leaderboard Trackers</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

@ -6,6 +6,8 @@
#include "settingswindow.h"
#include "settingwidgetbinder.h"
#include "core/achievements.h"
#include "util/http_cache.h"
#include "util/object_archive.h"
@ -81,6 +83,23 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
dialog->registerWidgetHelp(m_ui.coversDirectory, tr("Covers Directory"), tr("Default"),
tr("Specifies the directory where game cover images that are used in the game grid and "
"Big Picture UI will be stored."));
// RAIntegration is not available on non-win32/x64.
#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
if (Achievements::IsRAIntegrationAvailable())
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.useRAIntegration, "Cheevos", "UseRAIntegration", false);
else
m_ui.useRAIntegration->setEnabled(false);
dialog->registerWidgetHelp(
m_ui.useRAIntegration, tr("Enable RAIntegration (Development Only)"), tr("Unchecked"),
tr("When enabled, DuckStation will load the RAIntegration DLL which allows for achievement development.<br>The "
"RA_Integration.dll file must be placed in the same directory as the DuckStation executable."));
#else
m_ui.interfaceSettingsLayout->removeWidget(m_ui.useRAIntegration);
delete m_ui.useRAIntegration;
m_ui.useRAIntegration = nullptr;
#endif
}
AdvancedSettingsWidget::~AdvancedSettingsWidget() = default;

@ -110,7 +110,7 @@
<property name="title">
<string>Interface Settings</string>
</property>
<layout class="QGridLayout" name="formLayout">
<layout class="QGridLayout" name="interfaceSettingsLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="showDebugMenu">
<property name="text">
@ -118,6 +118,13 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="useRAIntegration">
<property name="text">
<string>Enable RAIntegration</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

Loading…
Cancel
Save