diff --git a/config.cpp b/config.cpp index 49098918..d9dbdb54 100644 --- a/config.cpp +++ b/config.cpp @@ -2160,6 +2160,8 @@ EX void menuitem_sightrange_style(key_type c IS('c')) { c ); dialog::add_action_push([] { + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(XLAT("draw range based on")); dialog::addBoolItem(XLAT("draw range based on distance"), vid.use_smart_range == 0, 'd'); dialog::add_action([] () { vid.use_smart_range = 0; popScreen(); edit_sightrange(); }); @@ -3886,6 +3888,8 @@ EX void show_color_dialog() { #if CAP_CONFIG EX void resetConfigMenu() { + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(XLAT("reset all configuration")); dialog::addInfo("Are you sure?"); dialog::addItem("yes, and delete the config file", 'd'); diff --git a/menus.cpp b/menus.cpp index 099693c5..fef57221 100644 --- a/menus.cpp +++ b/menus.cpp @@ -1193,6 +1193,7 @@ EX named_functionality get_o_key() { if(isize(res) == 1) return res[0]; return named_dialog(res[0].first + "/...", [res] { + cmode = sm::VR_MENU; emptyscreen(); dialog::init(); char id = 'o'; diff --git a/rogueviz/ads/hiscore.cpp b/rogueviz/ads/hiscore.cpp index a784c403..45cdf6c8 100644 --- a/rogueviz/ads/hiscore.cpp +++ b/rogueviz/ads/hiscore.cpp @@ -109,6 +109,7 @@ void load_hiscores() { int hi_sort_by = 3; void hiscore_menu() { + cmode = sm::VR_MENU; emptyscreen(); dialog::init("High scores"); fill_gamedata(); @@ -129,6 +130,7 @@ void hiscore_menu() { for(auto ad: v) { dialog::addSelItem(ad->myname + " (" + ad->deathreason + ")", main_rock ? fts(getval(ad)) : its(getval(ad)), dialog::list_fake_key++); dialog::add_action_push([ad] { + cmode = sm::VR_MENU; emptyscreen(); dialog::init(ad->myname); if(!main_rock) { diff --git a/rogueviz/bringris.cpp b/rogueviz/bringris.cpp index 1f4ed842..dfc4306b 100644 --- a/rogueviz/bringris.cpp +++ b/rogueviz/bringris.cpp @@ -1282,6 +1282,8 @@ void create_game(); void geometry_menu() { clearMessages(); + cmode = sm::VR_MENU; + emptyscreen(); dialog::init("Bringris geometries"); dialog::addBreak(100); int total_stars = 0; @@ -1398,6 +1400,7 @@ void visual_menu() { } void settings_menu() { + cmode = sm::VR_MENU; emptyscreen(); dialog::init("Bringris settings"); dialog::addItem("alternative geometry", 'g'); @@ -1429,6 +1432,7 @@ void settings_menu() { bool hi_pro; void hiscore_menu() { + cmode = sm::VR_MENU; emptyscreen(); dialog::init("High scores"); string s = bgeoms[bgeom].name; @@ -1445,6 +1449,7 @@ void hiscore_menu() { for(auto ad: v) { dialog::addSelItem(ad->myname, hi_pro ? fts(ad->score) : its(ad->completed), dialog::list_fake_key++); dialog::add_action_push([ad] { + cmode = sm::VR_MENU; emptyscreen(); dialog::init(); if(hi_pro) dialog::addSelItem("score", fts(ad->score), 's'); diff --git a/rogueviz/nilrider/nilrider.cpp b/rogueviz/nilrider/nilrider.cpp index bab50345..d1ca1895 100644 --- a/rogueviz/nilrider/nilrider.cpp +++ b/rogueviz/nilrider/nilrider.cpp @@ -225,6 +225,7 @@ void toggle_replay() { void run() { cmode = sm::PANNING | sm::NORMAL; + emptyscreen(); clearMessages(); dialog::init(); if(view_replay && !paused) { @@ -333,6 +334,8 @@ string fname = "horizontal.nrl"; ld total_stars = 0; void pick_level() { + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(XLAT("select the track"), 0xC0C0FFFF, 150, 100); ld cur_stars = 0; for(auto l: all_levels) { @@ -385,6 +388,8 @@ void pick_level() { void layer_selection_screen() { poly_outline = 0xFF; + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(XLAT("layer selection"), 0xC0C0FFFF, 150, 100); dialog::addBreak(50); auto layers = curlev->gen_layer_list(); @@ -399,6 +404,8 @@ void layer_selection_screen() { void pick_game() { clearMessages(); + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(); poly_outline = 0xFF; dialog::addBigItem(curlev->name, 't'); @@ -449,6 +456,8 @@ void nil_set_perspective() { } void nil_projection() { + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(XLAT("projection of Nil"), 0xC0C0FFFF, 150, 100); dialog::addBoolItem("geodesics", pmodel == mdGeodesic, 'g'); dialog::add_action([] { popScreen(); nil_set_geodesic(); }); @@ -463,6 +472,8 @@ void nil_projection() { } void settings() { + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(XLAT("settings"), 0xC0C0FFFF, 150, 100); add_edit(aimspeed_key_x); add_edit(aimspeed_key_y); @@ -519,6 +530,8 @@ template void replays_of_type(vector& v, const U& dialog::addItem(r.name, 'a'); dialog::add_action([&v, i, loader, ghost_loader] { pushScreen([&v, i, loader, ghost_loader] { + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(XLAT(planning_mode ? "saved plan" : "replay"), 0xC0C0FFFF, 150, 100); dialog::addInfo(v[i].name); @@ -554,6 +567,8 @@ template void replays_of_type(vector& v, const U& #if CAP_SAVE void replays() { + cmode = sm::VR_MENU; + emptyscreen(); dialog::init(XLAT(planning_mode ? "saved plans" : "replays"), 0xC0C0FFFF, 150, 100); if(!planning_mode) replays_of_type(curlev->manual_replays, [] (manual_replay& r) { view_replay = false; @@ -651,7 +666,9 @@ void help_instruments() { void main_menu() { clearMessages(); + cmode = sm::VR_MENU; poly_outline = 0xFF; + emptyscreen(); dialog::init(XLAT("Nil Rider"), 0xC0C0FFFF, 150, 100); dialog::addItem("continue", 'c');