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;