summaryrefslogtreecommitdiff
path: root/src/user/raleigh/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/raleigh/util.cpp')
-rw-r--r--src/user/raleigh/util.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/user/raleigh/util.cpp b/src/user/raleigh/util.cpp
index a300d01..1687ea6 100644
--- a/src/user/raleigh/util.cpp
+++ b/src/user/raleigh/util.cpp
@@ -1,3 +1,5 @@
+#include <raleigh/d/dialog.h>
+#include <raleigh/w/label.h>
#include <raleigh/util.h>
#include <knob/format.h>
#include <pland/pcrt.h>
@@ -17,4 +19,18 @@ namespace raleigh {
__pcrt_quit();
}
+
+ __attribute__ ((noreturn))
+ void show_error_popup_and_quitf(const char *fmt, ...) {
+ va_list args;
+ va_start(args, fmt);
+
+ char *ch = format_v(fmt, args);
+ label l(ch);
+
+ dialog d(l, okay);
+ d.show_modal();
+
+ __pcrt_quit();
+ }
} \ No newline at end of file