mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-10 22:36:02 +00:00
do not use emptyscreen. Use gamescreen but with NOSCR
This commit is contained in:
@@ -2160,8 +2160,8 @@ EX void menuitem_sightrange_style(key_type c IS('c')) {
|
||||
c
|
||||
);
|
||||
dialog::add_action_push([] {
|
||||
cmode = sm::VR_MENU;
|
||||
emptyscreen();
|
||||
cmode = sm::VR_MENU | sm::NOSCR;
|
||||
gamescreen();
|
||||
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(); });
|
||||
@@ -3888,8 +3888,8 @@ EX void show_color_dialog() {
|
||||
|
||||
#if CAP_CONFIG
|
||||
EX void resetConfigMenu() {
|
||||
cmode = sm::VR_MENU;
|
||||
emptyscreen();
|
||||
cmode = sm::VR_MENU | sm::NOSCR;
|
||||
gamescreen();
|
||||
dialog::init(XLAT("reset all configuration"));
|
||||
dialog::addInfo("Are you sure?");
|
||||
dialog::addItem("yes, and delete the config file", 'd');
|
||||
|
@@ -1094,7 +1094,7 @@ EX namespace dialog {
|
||||
void color_dialog::draw() {
|
||||
cmode = sm::NUMBER | dialogflags;
|
||||
if(cmode & sm::SIDE) gamescreen();
|
||||
else emptyscreen();
|
||||
else stillscreen = true, emptyscreen();
|
||||
|
||||
dcenter = vid.xres/2;
|
||||
dwidth = vid.xres;
|
||||
|
@@ -1193,8 +1193,8 @@ 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();
|
||||
cmode = sm::VR_MENU | sm::NOSCR;
|
||||
gamescreen();
|
||||
dialog::init();
|
||||
char id = 'o';
|
||||
for(auto& r: res) {
|
||||
|
@@ -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;
|
||||
|
@@ -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');
|
||||
|
@@ -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');
|
||||
|
@@ -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();
|
||||
|
@@ -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 = ' ';
|
||||
|
5
tour.cpp
5
tour.cpp
@@ -479,6 +479,8 @@ EX namespace ss {
|
||||
}
|
||||
|
||||
EX void slideshow_menu() {
|
||||
cmode = sm::VR_MENU | sm::NOSCR;
|
||||
gamescreen();
|
||||
dialog::init(XLAT("slideshows"), forecolor, 150, 100);
|
||||
for_all_slideshows([] (string title, slide *sl, char ch) {
|
||||
dialog::addBoolItem(title, wts == sl, ch);
|
||||
@@ -491,6 +493,9 @@ EX namespace ss {
|
||||
EX void showMenu() {
|
||||
if(!wts) wts = slides;
|
||||
|
||||
cmode = sm::VR_MENU | sm::NOSCR;
|
||||
gamescreen();
|
||||
|
||||
dialog::init(XLAT("slides"), forecolor, 150, 100);
|
||||
|
||||
string cftrans, cftransbuild;
|
||||
|
Reference in New Issue
Block a user