mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
fixed land search in Overview
This commit is contained in:
parent
d059eb028c
commit
05309e3272
10
menus.cpp
10
menus.cpp
@ -50,6 +50,8 @@ EX void showOverview() {
|
||||
|
||||
bool not_in_game = false;
|
||||
|
||||
auto displayed_landlist = landlist;
|
||||
|
||||
if(dialog::infix != "") {
|
||||
auto land_matches = [] (eLand l) {
|
||||
string s = dnameof(l);
|
||||
@ -63,14 +65,14 @@ EX void showOverview() {
|
||||
vector<eLand> filtered;
|
||||
for(eLand l: landlist) if(land_matches(l)) filtered.push_back(l);
|
||||
if(filtered.size())
|
||||
landlist = filtered;
|
||||
displayed_landlist = filtered;
|
||||
else {
|
||||
for(int i=0; i<landtypes; i++) if(land_matches(eLand(i))) filtered.push_back(eLand(i));
|
||||
if(filtered.size()) landlist = filtered, not_in_game = true;
|
||||
if(filtered.size()) displayed_landlist = filtered, not_in_game = true;
|
||||
}
|
||||
}
|
||||
|
||||
int nl = isize(landlist), nlm;
|
||||
int nl = isize(displayed_landlist), nlm;
|
||||
|
||||
int lstart = 0;
|
||||
|
||||
@ -92,7 +94,7 @@ EX void showOverview() {
|
||||
}
|
||||
|
||||
for(int i=0; i<nl; i++) {
|
||||
eLand l = landlist[lstart + i];
|
||||
eLand l = displayed_landlist[lstart + i];
|
||||
int xr = vid.xres / 64;
|
||||
int i0 = 56 + vid.fsize + i * vf;
|
||||
color_t col;
|
||||
|
Loading…
Reference in New Issue
Block a user