displaying distance lists now depends on show_distance_lists, not whether sidescreen is supported

This commit is contained in:
Zeno Rogue 2018-09-23 13:48:59 +02:00
parent 2587474115
commit 608a55499a
3 changed files with 8 additions and 4 deletions

View File

@ -415,7 +415,7 @@ template<class T> int type_in_reduced(expansion_analyzer& ea, cell *c, const T&
return t;
}
bool viewdists = false, use_color_codes = true, use_analyzer = true;
bool viewdists = false, use_color_codes = true, use_analyzer = true, show_distance_lists = true;
int first_distance = 0, scrolltime = 0;
bool scrolling_distances = false;
@ -483,6 +483,9 @@ void viewdist_configure_dialog() {
dialog::addBoolItem("use analyzer", use_analyzer, 'a');
dialog::add_action([] () { use_analyzer = !use_analyzer; });
dialog::addBoolItem("show distance lists", show_distance_lists, 'l');
dialog::add_action([] () { show_distance_lists = !show_distance_lists; });
dialog::addSelItem("display distances from", its(first_distance), 'd');
dialog::add_action([] () {
scrolling_distances = false;
@ -626,10 +629,11 @@ void enable_viewdists() {
number_coding = ncDistance;
distance_from = dfPlayer;
}
show_distance_lists = true;
}
bool expansion_handleKey(int sym, int uni) {
if((cmode & sm::EXPANSION) && (cmode & sm::NORMAL)) {
if(cmode & sm::NORMAL) {
if(uni == 'S') scrolling_distances = !scrolling_distances;
else if(uni == 'C') pushScreen(viewdist_configure_dialog);
else if(sym == SDLK_ESCAPE) first_distance = 0, viewdists = false;

View File

@ -5676,7 +5676,7 @@ void normalscreen() {
if(!outofmap(mouseh)) getcstat = '-';
cmode = sm::NORMAL | sm::DOTOUR | sm::CENTER;
if(viewdists) cmode |= sm::SIDE;
if(viewdists && show_distance_lists) cmode |= sm::SIDE | sm::MAYDARK;
gamescreen(hiliteclick && mmmon ? 1 : 0); drawStats();
if(nomenukey || ISMOBILE)
;

View File

@ -346,7 +346,7 @@ bool nofps = false;
void drawStats() {
if(nohud || stereo::mode == stereo::sLR) return;
if(callhandlers(false, hooks_prestats)) return;
if(viewdists && sidescreen)
if(viewdists && show_distance_lists)
expansion.view_distances_dialog();
if(sidescreen) return;