From fe3f6205d2d7a8c9f3a870b6e83b9f5f700250fd Mon Sep 17 00:00:00 2001 From: Maximilian Mader Date: Wed, 15 Apr 2026 17:06:32 +0200 Subject: [PATCH] DolphinQt: Add a tooltip to the CGB boot ROM selection --- Source/Core/DolphinQt/CMakeLists.txt | 2 ++ .../Config/ToolTipControls/ToolTipLabel.cpp | 14 ++++++++++++++ .../Config/ToolTipControls/ToolTipLabel.h | 17 +++++++++++++++++ Source/Core/DolphinQt/DolphinQt.vcxproj | 2 ++ Source/Core/DolphinQt/Settings/GameCubePane.cpp | 17 ++++++++++++++++- 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 Source/Core/DolphinQt/Config/ToolTipControls/ToolTipLabel.cpp create mode 100644 Source/Core/DolphinQt/Config/ToolTipControls/ToolTipLabel.h diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index b0c6829de2..8031a5c16b 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -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 diff --git a/Source/Core/DolphinQt/Config/ToolTipControls/ToolTipLabel.cpp b/Source/Core/DolphinQt/Config/ToolTipControls/ToolTipLabel.cpp new file mode 100644 index 0000000000..97bd6ab8c6 --- /dev/null +++ b/Source/Core/DolphinQt/Config/ToolTipControls/ToolTipLabel.cpp @@ -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); +} diff --git a/Source/Core/DolphinQt/Config/ToolTipControls/ToolTipLabel.h b/Source/Core/DolphinQt/Config/ToolTipControls/ToolTipLabel.h new file mode 100644 index 0000000000..bfa070c719 --- /dev/null +++ b/Source/Core/DolphinQt/Config/ToolTipControls/ToolTipLabel.h @@ -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 + +class ToolTipLabel : public ToolTipWidget +{ +public: + explicit ToolTipLabel(const QString& label); + +private: + QPoint GetToolTipPosition() const override; +}; diff --git a/Source/Core/DolphinQt/DolphinQt.vcxproj b/Source/Core/DolphinQt/DolphinQt.vcxproj index 1a3cdfef23..e2c45ec5bb 100644 --- a/Source/Core/DolphinQt/DolphinQt.vcxproj +++ b/Source/Core/DolphinQt/DolphinQt.vcxproj @@ -131,6 +131,7 @@ + @@ -362,6 +363,7 @@ + diff --git a/Source/Core/DolphinQt/Settings/GameCubePane.cpp b/Source/Core/DolphinQt/Settings/GameCubePane.cpp index a1c2c58110..9b261ef55d 100644 --- a/Source/Core/DolphinQt/Settings/GameCubePane.cpp +++ b/Source/Core/DolphinQt/Settings/GameCubePane.cpp @@ -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 Game Boy Color boot ROM.
" + "This file gets loaded when a Game Boy or Game Boy Color game is run by the " + "Game Boy Player.

" + "If this file is not found, the boot ROM gets skipped. " + "This means the Game Boy Color boot animation and color palette selection for Game " + "Boy games will be missing, otherwise there is no functional difference.

" + "At this time there is no known method to dump the Game Boy Color-mode boot ROM from " + "a Game Boy Advance or Game Boy Player.
" + "The boot ROM dumped from a Game Boy Color works and the emulator makes sure that the " + "system appears as a Game Boy Advance to games, meaning that features like the " + "\"Advance Shop\" in the TLoZ Oracle games are available.

" + "If unsure, do not change.")); - 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);