From 3daecc49814c4d659a4e14952d25a57d3d9e4850 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 17 Jun 2018 19:04:17 +0200 Subject: [PATCH] Land validity is displayed when selecting geometry after selecting land. Validity message appears in the geom-exp menu. --- geom-exp.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/geom-exp.cpp b/geom-exp.cpp index 710a27aa..01b3d7b6 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -220,6 +220,15 @@ void showTorusConfig() { 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() { cmode = sm::SIDE; gamescreen(0); @@ -241,6 +250,8 @@ void showEuclideanMenu() { landvisited[laSnakeNest] |= landvisited[laRedRock]; landvisited[laCA] = true; // for(int i=2; i cg(geometry, eGeometry(i)); + dialog::lastItem().value += validclasses[land_validity(specialland).quality_level]; + } dialog::addBreak(50); @@ -273,7 +287,9 @@ void showEuclideanMenu() { dialog::lastItem().value = gp::operation_name(); } - dialog::addBreak(50); + dialog::addBreak(25); + validity_info(); + dialog::addBreak(25); int worldsize = denom ? nom/denom : 0; if(tq & qTORUS) worldsize = torusconfig::qty; @@ -391,7 +407,6 @@ void showEuclideanMenu() { char ch; if(i < 26) ch = 'a' + i; else ch = 'A' + (i-26); - string validclasses[4] = {" (X)", " (½)", "", " (!)"}; string s = XLAT1(linf[l].name); if(landvisited[l]) { @@ -408,6 +423,10 @@ void showEuclideanMenu() { if(chaosUnlocked && !quotient && !euclid && !sphere) dialog::addItem(XLAT("Chaos mode"), '1'); dialog::addItem(XLAT("next page"), '-'); + + dialog::addBreak(25); + validity_info(); + dialog::addBreak(25); dialog::addHelp(); dialog::addBack();