aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-03-20 07:57:31 -0400
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-04-15 01:53:17 -0400
commit4143675b2df288534e6e1a3f06a87d88dbaba257 (patch)
tree0b15d79e756edf85eeecde185782e8cd2fe53d70 /src/yuzu/main.cpp
parent4a5f9f5a6d3bfd8796f52d6c778a8abb3922ff40 (diff)
overlay_dialog: Add an overlay text dialog that accepts controller input
An OverlayDialog is an interactive dialog that accepts controller input (while a game is running) This dialog attempts to replicate the look and feel of the Nintendo Switch's overlay dialogs and provide some extra features such as embedding HTML/Rich Text content in a QTextBrowser. The OverlayDialog provides 2 modes: one to embed regular text into a QLabel and another to embed HTML/Rich Text content into a QTextBrowser. Co-authored-by: Its-Rei <kupfel@gmail.com>
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 422b3cff66..3d4558739e 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -101,6 +101,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
#include "core/perf_stats.h"
#include "core/telemetry_session.h"
#include "input_common/main.h"
+#include "util/overlay_dialog.h"
#include "video_core/gpu.h"
#include "video_core/shader_notify.h"
#include "yuzu/about_dialog.h"
@@ -2266,7 +2267,10 @@ void GMainWindow::OnExecuteProgram(std::size_t program_index) {
}
void GMainWindow::ErrorDisplayDisplayError(QString body) {
- QMessageBox::critical(this, tr("Error Display"), body);
+ OverlayDialog dialog(render_window, Core::System::GetInstance(), body, QString{}, tr("OK"),
+ Qt::AlignLeft | Qt::AlignVCenter);
+ dialog.exec();
+
emit ErrorDisplayFinished();
}