summaryrefslogtreecommitdiff
path: root/src/user/raleigh/util.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-05 18:07:48 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-05 18:07:48 -0500
commit76e39eac8cee2175ec62a191f7c91ca53857e80c (patch)
tree156946f6e8f491235453aa3cbecfda43d6baa2a7 /src/user/raleigh/util.cpp
parent5e5e524f08ad653a7bf5d6e97f3a49f6c27d08fa (diff)
downloadportland-os-76e39eac8cee2175ec62a191f7c91ca53857e80c.tar.gz
more raleigh, including button and vbox widgets
Diffstat (limited to 'src/user/raleigh/util.cpp')
-rw-r--r--src/user/raleigh/util.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/user/raleigh/util.cpp b/src/user/raleigh/util.cpp
index 958897b..db0982b 100644
--- a/src/user/raleigh/util.cpp
+++ b/src/user/raleigh/util.cpp
@@ -1,6 +1,22 @@
#include <raleigh/util.h>
+#include <popups/info.h>
+#include <pland/pcrt.h>
-coord::coord(uint32_t x, uint32_t y)
- : x(x), y(y) {}
-coord::coord()
- : x(0), y(0) {} \ No newline at end of file
+namespace raleigh {
+ coord::coord(uint32_t x, uint32_t y)
+ : x(x), y(y) {}
+ coord::coord()
+ : x(0), y(0) {}
+
+ __attribute__ ((noreturn))
+ void show_error_and_quitf(const char *fmt, ...) {
+ va_list args;
+ va_start(args, fmt);
+
+ struct popup info;
+ info_popupf_v(&info, fmt, RGB(7f, 00, 00), RGB(bf, bf, bf), args);
+ make_modal(&info);
+
+ __pcrt_quit();
+ }
+} \ No newline at end of file