1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-10 06:16:00 +00:00

do not use emptyscreen. Use gamescreen but with NOSCR

This commit is contained in:
Zeno Rogue
2025-08-25 21:51:57 +02:00
parent 02ba3ee404
commit 6b30441ea1
9 changed files with 29 additions and 35 deletions

View File

@@ -109,8 +109,7 @@ void load_hiscores() {
int hi_sort_by = 3;
void hiscore_menu() {
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init("High scores");
fill_gamedata();
vector<gamedata*> v;

View File

@@ -1282,8 +1282,7 @@ void create_game();
void geometry_menu() {
clearMessages();
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init("Bringris geometries");
dialog::addBreak(100);
int total_stars = 0;
@@ -1400,8 +1399,7 @@ void visual_menu() {
}
void settings_menu() {
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init("Bringris settings");
dialog::addItem("alternative geometry", 'g');
dialog::add_action_push(geometry_menu);
@@ -1432,8 +1430,7 @@ void settings_menu() {
bool hi_pro;
void hiscore_menu() {
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init("High scores");
string s = bgeoms[bgeom].name;
if(cur.max_piece != bgeoms[bgeom].default_max_piece) s = s + " (block " + its(cur.max_piece) + ")";
@@ -1449,8 +1446,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();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init();
if(hi_pro) dialog::addSelItem("score", fts(ad->score), 's');
dialog::addSelItem("levels", fts(ad->completed), 'l');

View File

@@ -334,8 +334,7 @@ string fname = "horizontal.nrl";
ld total_stars = 0;
void pick_level() {
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init(XLAT("select the track"), 0xC0C0FFFF, 150, 100);
ld cur_stars = 0;
for(auto l: all_levels) {
@@ -388,8 +387,7 @@ void pick_level() {
void layer_selection_screen() {
poly_outline = 0xFF;
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init(XLAT("layer selection"), 0xC0C0FFFF, 150, 100);
dialog::addBreak(50);
auto layers = curlev->gen_layer_list();
@@ -404,8 +402,7 @@ void layer_selection_screen() {
void pick_game() {
clearMessages();
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init();
poly_outline = 0xFF;
dialog::addBigItem(curlev->name, 't');
@@ -456,8 +453,7 @@ void nil_set_perspective() {
}
void nil_projection() {
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init(XLAT("projection of Nil"), 0xC0C0FFFF, 150, 100);
dialog::addBoolItem("geodesics", pmodel == mdGeodesic, 'g');
dialog::add_action([] { popScreen(); nil_set_geodesic(); });
@@ -472,8 +468,7 @@ void nil_projection() {
}
void settings() {
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init(XLAT("settings"), 0xC0C0FFFF, 150, 100);
add_edit(aimspeed_key_x);
add_edit(aimspeed_key_y);
@@ -530,8 +525,7 @@ template<class T, class U, class V> void replays_of_type(vector<T>& 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();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init(XLAT(planning_mode ? "saved plan" : "replay"), 0xC0C0FFFF, 150, 100);
dialog::addInfo(v[i].name);
@@ -567,8 +561,7 @@ template<class T, class U, class V> void replays_of_type(vector<T>& v, const U&
#if CAP_SAVE
void replays() {
cmode = sm::VR_MENU;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
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;
@@ -666,9 +659,8 @@ void help_instruments() {
void main_menu() {
clearMessages();
cmode = sm::VR_MENU;
poly_outline = 0xFF;
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init(XLAT("Nil Rider"), 0xC0C0FFFF, 150, 100);
dialog::addItem("continue", 'c');

View File

@@ -319,7 +319,7 @@ void model_data::render(const shiftmatrix& V) {
}
void model_settings() {
emptyscreen();
cmode = sm::VR_MENU | sm::NOSCR; gamescreen();
dialog::init();
add_edit(prec);
dialog::addBack();

View File

@@ -121,6 +121,8 @@ void empty_screen(presmode mode, color_t col) {
void slide_error(presmode mode, string s) {
empty_screen(mode, 0x400000);
add_stat(mode, [s] {
cmode = sm::VR_MENU | sm::NOSCR;
gamescreen();
dialog::init();
dialog::addTitle(s, 0xFF0000, 150);
dialog::display();
@@ -434,7 +436,7 @@ void show_animation(presmode mode, string s, int sx, int sy, int frames, int fps
}
void choose_presentation() {
cmode = sm::NOSCR;
cmode = sm::NOSCR | sm::VR_MENU;
gamescreen();
getcstat = ' ';