Movie Window: Move customization options from Menu Bar to OSD pane, but add options to toggle the window and to open the OSD pane.

Add new setting to show/hide the Movie Window.
This commit is contained in:
TryTwo 2025-09-20 15:04:07 -07:00
commit 3b11280c20
10 changed files with 38 additions and 42 deletions

View file

@ -512,6 +512,7 @@ const Info<bool> MAIN_MOVIE_DUMP_FRAMES_SILENT{{System::Main, "Movie", "DumpFram
const Info<bool> MAIN_MOVIE_SHOW_INPUT_DISPLAY{{System::Main, "Movie", "ShowInputDisplay"}, false};
const Info<bool> MAIN_MOVIE_SHOW_RTC{{System::Main, "Movie", "ShowRTC"}, false};
const Info<bool> MAIN_MOVIE_SHOW_RERECORD{{System::Main, "Movie", "ShowRerecord"}, false};
const Info<bool> MAIN_MOVIE_SHOW_OSD{{System::Main, "Movie", "ShowMovieWindow"}, false};
// Main.Input

View file

@ -327,6 +327,7 @@ extern const Info<bool> MAIN_MOVIE_DUMP_FRAMES_SILENT;
extern const Info<bool> MAIN_MOVIE_SHOW_INPUT_DISPLAY;
extern const Info<bool> MAIN_MOVIE_SHOW_RTC;
extern const Info<bool> MAIN_MOVIE_SHOW_RERECORD;
extern const Info<bool> MAIN_MOVIE_SHOW_OSD;
// Main.Input

View file

@ -38,6 +38,7 @@ enum class SettingsWindowPaneIndex : int
Graphics,
Controllers,
Interface,
OnScreenDisplay,
Audio,
Paths,
GameCube,

View file

@ -583,6 +583,7 @@ void MainWindow::ConnectMenuBar()
connect(m_menu_bar, &MenuBar::StopRecording, this, &MainWindow::OnStopRecording);
connect(m_menu_bar, &MenuBar::ExportRecording, this, &MainWindow::OnExportRecording);
connect(m_menu_bar, &MenuBar::ShowTASInput, this, &MainWindow::ShowTASInput);
connect(m_menu_bar, &MenuBar::ConfigureOSD, this, &MainWindow::ShowOSDWindow);
// View
connect(m_menu_bar, &MenuBar::ShowList, m_game_list, &GameList::SetListView);
@ -1327,6 +1328,12 @@ void MainWindow::ShowGeneralWindow()
m_settings_window->SelectPane(SettingsWindowPaneIndex::General);
}
void MainWindow::ShowOSDWindow()
{
ShowSettingsWindow();
m_settings_window->SelectPane(SettingsWindowPaneIndex::OnScreenDisplay);
}
void MainWindow::ShowAboutDialog()
{
AboutDialog about{this};

View file

@ -208,6 +208,7 @@ private:
void OnActivateChat();
void OnRequestGolfControl();
void ShowTASInput();
void ShowOSDWindow();
void ChangeDisc();
void EjectDisc();

View file

@ -14,7 +14,6 @@
#include <QFontDialog>
#include <QInputDialog>
#include <QMap>
#include <QSignalBlocker>
#include <QUrl>
#include <fmt/format.h>
@ -66,6 +65,7 @@
#include "DolphinQt/QtUtils/NonAutodismissibleMenu.h"
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
#include "DolphinQt/QtUtils/QueueOnObject.h"
#include "DolphinQt/QtUtils/SignalBlocking.h"
#include "DolphinQt/Settings.h"
#include "DolphinQt/Updater.h"
@ -176,8 +176,9 @@ void MenuBar::OnEmulationStateChanged(Core::State state)
void MenuBar::OnConfigChanged()
{
const QSignalBlocker blocker(m_jit_profile_blocks);
m_jit_profile_blocks->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_ENABLE_PROFILING));
SignalBlocking(m_jit_profile_blocks)
->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_ENABLE_PROFILING));
SignalBlocking(m_movie_window)->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_OSD));
}
void MenuBar::OnDebugModeToggled(bool enabled)
@ -845,36 +846,13 @@ void MenuBar::AddMovieMenu()
connect(pause_at_end, &QAction::toggled,
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_MOVIE_PAUSE_MOVIE, value); });
auto* rerecord_counter = movie_menu->addAction(tr("Show Rerecord Counter"));
rerecord_counter->setCheckable(true);
rerecord_counter->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_RERECORD));
connect(rerecord_counter, &QAction::toggled,
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_MOVIE_SHOW_RERECORD, value); });
m_movie_window = movie_menu->addAction(tr("Enable Movie Window"));
m_movie_window->setCheckable(true);
m_movie_window->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_OSD));
connect(m_movie_window, &QAction::toggled,
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_MOVIE_SHOW_OSD, value); });
auto* lag_counter = movie_menu->addAction(tr("Show Lag Counter"));
lag_counter->setCheckable(true);
lag_counter->setChecked(Config::Get(Config::MAIN_SHOW_LAG));
connect(lag_counter, &QAction::toggled,
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_SHOW_LAG, value); });
auto* frame_counter = movie_menu->addAction(tr("Show Frame Counter"));
frame_counter->setCheckable(true);
frame_counter->setChecked(Config::Get(Config::MAIN_SHOW_FRAME_COUNT));
connect(frame_counter, &QAction::toggled,
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_SHOW_FRAME_COUNT, value); });
auto* input_display = movie_menu->addAction(tr("Show Input Display"));
input_display->setCheckable(true);
input_display->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY));
connect(input_display, &QAction::toggled, [](bool value) {
Config::SetBaseOrCurrent(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY, value);
});
auto* system_clock = movie_menu->addAction(tr("Show System Clock"));
system_clock->setCheckable(true);
system_clock->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_RTC));
connect(system_clock, &QAction::toggled,
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_MOVIE_SHOW_RTC, value); });
movie_menu->addAction(tr("Customize Movie Window"), this, &MenuBar::ConfigureOSD);
movie_menu->addSeparator();

View file

@ -132,6 +132,8 @@ signals:
void RecordingStatusChanged(bool recording);
void ReadOnlyModeChanged(bool read_only);
void ConfigureOSD();
private:
void OnEmulationStateChanged(Core::State state);
void OnConfigChanged();
@ -251,6 +253,7 @@ private:
QAction* m_recording_start;
QAction* m_recording_stop;
QAction* m_recording_read_only;
QAction* m_movie_window;
// Options
QAction* m_boot_to_pause;

View file

@ -67,6 +67,7 @@ void OnScreenDisplayPane::CreateLayout()
auto* movie_layout = new QGridLayout();
movie_box->setLayout(movie_layout);
m_movie_window = new ConfigBool(tr("Show Movie Window"), Config::MAIN_MOVIE_SHOW_OSD);
m_rerecord_counter =
new ConfigBool(tr("Show Rerecord Counter"), Config::MAIN_MOVIE_SHOW_RERECORD);
m_lag_counter = new ConfigBool(tr("Show Lag Counter"), Config::MAIN_SHOW_LAG);
@ -74,11 +75,12 @@ void OnScreenDisplayPane::CreateLayout()
m_input_display = new ConfigBool(tr("Show Input Display"), Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY);
m_system_clock = new ConfigBool(tr("Show System Clock"), Config::MAIN_MOVIE_SHOW_RTC);
movie_layout->addWidget(m_rerecord_counter, 0, 0);
movie_layout->addWidget(m_lag_counter, 0, 1);
movie_layout->addWidget(m_frame_counter, 1, 0);
movie_layout->addWidget(m_input_display, 1, 1);
movie_layout->addWidget(m_system_clock, 2, 0);
movie_layout->addWidget(m_movie_window, 0, 0);
movie_layout->addWidget(m_rerecord_counter, 1, 0);
movie_layout->addWidget(m_lag_counter, 1, 1);
movie_layout->addWidget(m_frame_counter, 2, 0);
movie_layout->addWidget(m_input_display, 2, 1);
movie_layout->addWidget(m_system_clock, 3, 0);
// NetPlay
auto* netplay_box = new QGroupBox(tr("Netplay"));
@ -197,6 +199,10 @@ void OnScreenDisplayPane::AddDescriptions()
"while playing NetPlay.<br><br><dolphin_emphasis>If unsure, leave "
"this unchecked.</dolphin_emphasis>");
static const char TR_MOVIE_WINDOW_DESCRIPTION[] =
QT_TR_NOOP("Shows a window that can be filled with information related to movie recordings. "
"The other options in this group determine what appears in the window. "
"<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
static const char TR_RERECORD_COUNTER_DESCRIPTION[] =
QT_TR_NOOP("Shows how many times the input recording has been overwritten by using "
"savestates.<br><br><dolphin_emphasis>If unsure, leave "
@ -237,6 +243,7 @@ void OnScreenDisplayPane::AddDescriptions()
m_show_ping->SetDescription(tr(TR_SHOW_NETPLAY_PING_DESCRIPTION));
m_show_chat->SetDescription(tr(TR_SHOW_NETPLAY_MESSAGES_DESCRIPTION));
m_movie_window->SetDescription(tr(TR_MOVIE_WINDOW_DESCRIPTION));
m_rerecord_counter->SetDescription(tr(TR_RERECORD_COUNTER_DESCRIPTION));
m_lag_counter->SetDescription(tr(TR_LAG_COUNTER_DESCRIPTION));
m_frame_counter->SetDescription(tr(TR_FRAME_COUNTER_DESCRIPTION));

View file

@ -35,6 +35,7 @@ private:
ConfigInteger* m_graph_update_rate;
// Movie window
ConfigBool* m_movie_window;
ConfigBool* m_rerecord_counter;
ConfigBool* m_lag_counter;
ConfigBool* m_frame_counter;

View file

@ -255,11 +255,7 @@ void OnScreenUI::DrawImGui()
// Create On-Screen-Messages
void OnScreenUI::DrawDebugText()
{
const bool show_movie_window =
Config::Get(Config::MAIN_SHOW_FRAME_COUNT) || Config::Get(Config::MAIN_SHOW_LAG) ||
Config::Get(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY) ||
Config::Get(Config::MAIN_MOVIE_SHOW_RTC) || Config::Get(Config::MAIN_MOVIE_SHOW_RERECORD);
if (show_movie_window)
if (Config::Get(Config::MAIN_MOVIE_SHOW_OSD))
{
// Position under the FPS display.
ImGui::SetNextWindowPos(