1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

Land validity is displayed when selecting geometry after selecting land. Validity message appears in the geom-exp menu.

This commit is contained in:
Zeno Rogue 2018-06-17 19:04:17 +02:00
parent d3200253db
commit 3daecc4981

View File

@ -220,6 +220,15 @@ void showTorusConfig() {
string bitruncnames[2] = {" (b)", " (n)"}; string bitruncnames[2] = {" (b)", " (n)"};
void validity_info() {
int vccolors[4] = {0xFF0000, 0xFF8000, 0xFFFF00, 0x00FF00};
auto lv = land_validity(specialland);
if(lv.flags & lv::display_error_message)
dialog::addInfo(XLAT(lv.msg), vccolors[lv.quality_level]);
else
dialog::addBreak(100);
}
void showEuclideanMenu() { void showEuclideanMenu() {
cmode = sm::SIDE; cmode = sm::SIDE;
gamescreen(0); gamescreen(0);
@ -242,6 +251,8 @@ void showEuclideanMenu() {
landvisited[laCA] = true; landvisited[laCA] = true;
// for(int i=2; i<lt; i++) landvisited[i] = true; // for(int i=2; i<lt; i++) landvisited[i] = true;
string validclasses[4] = {" (X)", " (½)", "", " (!)"};
if(ewhichscreen == 2) { if(ewhichscreen == 2) {
dialog::init(XLAT("experiment with geometry")); dialog::init(XLAT("experiment with geometry"));
int ts = ginf[geometry].sides; int ts = ginf[geometry].sides;
@ -259,8 +270,11 @@ void showEuclideanMenu() {
dialog::addSelItem(XLAT("land"), XLAT1(linf[specialland].name), '5'); dialog::addSelItem(XLAT("land"), XLAT1(linf[specialland].name), '5');
dialog::addBreak(50); dialog::addBreak(50);
for(int i=0; i<gGUARD; i++) for(int i=0; i<gGUARD; i++) {
dialog::addBoolItem(XLAT(ginf[i].name), geometry == i, 'a'+i); dialog::addBoolItem(XLAT(ginf[i].name), geometry == i, 'a'+i);
dynamicval<eGeometry> cg(geometry, eGeometry(i));
dialog::lastItem().value += validclasses[land_validity(specialland).quality_level];
}
dialog::addBreak(50); dialog::addBreak(50);
@ -273,7 +287,9 @@ void showEuclideanMenu() {
dialog::lastItem().value = gp::operation_name(); dialog::lastItem().value = gp::operation_name();
} }
dialog::addBreak(50); dialog::addBreak(25);
validity_info();
dialog::addBreak(25);
int worldsize = denom ? nom/denom : 0; int worldsize = denom ? nom/denom : 0;
if(tq & qTORUS) worldsize = torusconfig::qty; if(tq & qTORUS) worldsize = torusconfig::qty;
@ -391,7 +407,6 @@ void showEuclideanMenu() {
char ch; char ch;
if(i < 26) ch = 'a' + i; if(i < 26) ch = 'a' + i;
else ch = 'A' + (i-26); else ch = 'A' + (i-26);
string validclasses[4] = {" (X)", " (½)", "", " (!)"};
string s = XLAT1(linf[l].name); string s = XLAT1(linf[l].name);
if(landvisited[l]) { if(landvisited[l]) {
@ -409,6 +424,10 @@ void showEuclideanMenu() {
dialog::addItem(XLAT("Chaos mode"), '1'); dialog::addItem(XLAT("Chaos mode"), '1');
dialog::addItem(XLAT("next page"), '-'); dialog::addItem(XLAT("next page"), '-');
dialog::addBreak(25);
validity_info();
dialog::addBreak(25);
dialog::addHelp(); dialog::addHelp();
dialog::addBack(); dialog::addBack();
dialog::display(); dialog::display();