DolphinQt: Add a tooltip to the CGB boot ROM selection

This commit is contained in:
Maximilian Mader 2026-04-15 17:06:32 +02:00
parent cdc0ebdc0c
commit fe3f6205d2
No known key found for this signature in database
GPG Key ID: F71D56A3151C4FB3
5 changed files with 51 additions and 1 deletions

View File

@ -196,6 +196,8 @@ add_executable(dolphin-emu
Config/ToolTipControls/ToolTipCheckBox.h
Config/ToolTipControls/ToolTipComboBox.cpp
Config/ToolTipControls/ToolTipComboBox.h
Config/ToolTipControls/ToolTipLabel.cpp
Config/ToolTipControls/ToolTipLabel.h
Config/ToolTipControls/ToolTipPushButton.cpp
Config/ToolTipControls/ToolTipPushButton.h
Config/ToolTipControls/ToolTipRadioButton.cpp

View File

@ -0,0 +1,14 @@
// Copyright 2020 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "DolphinQt/Config/ToolTipControls/ToolTipLabel.h"
ToolTipLabel::ToolTipLabel(const QString& label) : ToolTipWidget(label)
{
SetTitle(label);
}
QPoint ToolTipLabel::GetToolTipPosition() const
{
return pos() + QPoint(width() / 2, height() / 2);
}

View File

@ -0,0 +1,17 @@
// Copyright 2020 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "DolphinQt/Config/ToolTipControls/ToolTipWidget.h"
#include <QLabel>
class ToolTipLabel : public ToolTipWidget<QLabel>
{
public:
explicit ToolTipLabel(const QString& label);
private:
QPoint GetToolTipPosition() const override;
};

View File

@ -131,6 +131,7 @@
<ClCompile Include="Config\ToolTipControls\BalloonTip.cpp" />
<ClCompile Include="Config\ToolTipControls\ToolTipCheckBox.cpp" />
<ClCompile Include="Config\ToolTipControls\ToolTipComboBox.cpp" />
<ClCompile Include="Config\ToolTipControls\ToolTipLabel.cpp" />
<ClCompile Include="Config\ToolTipControls\ToolTipPushButton.cpp" />
<ClCompile Include="Config\ToolTipControls\ToolTipRadioButton.cpp" />
<ClCompile Include="Config\ToolTipControls\ToolTipSlider.cpp" />
@ -362,6 +363,7 @@
<QtMoc Include="Config\ToolTipControls\BalloonTip.h" />
<ClInclude Include="Config\ToolTipControls\ToolTipCheckBox.h" />
<ClInclude Include="Config\ToolTipControls\ToolTipComboBox.h" />
<ClInclude Include="Config\ToolTipControls\ToolTipLabel.h" />
<ClInclude Include="Config\ToolTipControls\ToolTipPushButton.h" />
<ClInclude Include="Config\ToolTipControls\ToolTipRadioButton.h" />
<ClInclude Include="Config\ToolTipControls\ToolTipSlider.h" />

View File

@ -44,6 +44,7 @@
#include "DolphinQt/Config/ConfigControls/ConfigUserPath.h"
#endif
#include "DolphinQt/Config/Mapping/MappingWindow.h"
#include "DolphinQt/Config/ToolTipControls/ToolTipLabel.h"
#include "DolphinQt/GCMemcardManager.h"
#include "DolphinQt/QtUtils/DolphinFileDialog.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
@ -219,8 +220,22 @@ void GameCubePane::CreateWidgets()
File::GetUserPath(D_GBAUSER_IDX) + GBA_CGB_BOOT_ROM);
m_gba_browse_cgb_boot_rom = new NonDefaultQPushButton(QStringLiteral("..."));
m_gba_cgb_boot_rom_reset = new NonDefaultQPushButton(QStringLiteral("Reset"));
auto* gba_cgb_boot_rom_label = new ToolTipLabel(tr("Game Boy Color Boot ROM:"));
gba_cgb_boot_rom_label->SetDescription(tr(
"(Optional) Search path for the <i>Game Boy Color</i> boot ROM.<br>"
"This file gets loaded when a <i>Game Boy</i> or <i>Game Boy Color</i> game is run by the "
"<b>Game Boy Player</b>.<br><br>"
"If this file is not found, the boot ROM gets skipped. "
"This means the <i>Game Boy Color</i> boot animation and color palette selection for <i>Game "
"Boy</i> games will be missing, otherwise there is no functional difference.<br><br>"
"At this time there is no known method to dump the <i>Game Boy Color</i>-mode boot ROM from "
"a <i>Game Boy Advance</i> or <i>Game Boy Player</i>.<br>"
"The boot ROM dumped from a <i>Game Boy Color</i> works and the emulator makes sure that the "
"system appears as a <i>Game Boy Advance</i> to games, meaning that features like the "
"\"Advance Shop\" in the TLoZ Oracle games are available.<br><br>"
"<dolphin_emphasis>If unsure, do not change.</dolphin_emphasis>"));
gba_layout->addWidget(new QLabel(tr("Game Boy Color Boot ROM:")), gba_row, 0);
gba_layout->addWidget(gba_cgb_boot_rom_label, gba_row, 0);
gba_layout->addWidget(m_gba_cgb_boot_rom_edit, gba_row, 1);
gba_layout->addWidget(m_gba_browse_cgb_boot_rom, gba_row, 2);
gba_layout->addWidget(m_gba_cgb_boot_rom_reset, gba_row, 3);