From 367ff6f0352cb61122c37503b853f147f2f64829 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 31 Mar 2021 12:18:42 +0200 Subject: [PATCH] rogueviz::presentation:: slide_error function --- rogueviz/presentation.cpp | 10 ++++++++++ rogueviz/rogueviz.h | 1 + 2 files changed, 11 insertions(+) diff --git a/rogueviz/presentation.cpp b/rogueviz/presentation.cpp index b8175639..811f532f 100644 --- a/rogueviz/presentation.cpp +++ b/rogueviz/presentation.cpp @@ -88,6 +88,16 @@ void empty_screen(presmode mode, color_t col) { } } +void slide_error(presmode mode, string s) { + empty_screen(mode, 0x400000); + add_stat(mode, [s] { + dialog::init(); + dialog::addTitle(s, 0xFF0000, 150); + dialog::display(); + return true; + }); + } + map textures; void draw_texture(texture::texture_data& tex) { diff --git a/rogueviz/rogueviz.h b/rogueviz/rogueviz.h index c0782127..89b2e8a5 100644 --- a/rogueviz/rogueviz.h +++ b/rogueviz/rogueviz.h @@ -210,6 +210,7 @@ function roguevizslide_action(char c, const T& t, const U& act) void empty_screen(presmode mode, color_t col = 0xFFFFFFFF); void show_picture(presmode mode, string s); void use_angledir(presmode mode, bool reset); + void slide_error(presmode mode, string s); inline ld angle = 0; inline int dir = -1;