From 3afae980fdecf20717458d81466cc37739a03a95 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 27 Dec 2019 02:07:44 +0100 Subject: [PATCH] arb:: comment displayed in geom-exp --- arbitrile.cpp | 11 ++++++++++- geom-exp.cpp | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arbitrile.cpp b/arbitrile.cpp index a2f9f814..460e1d9a 100644 --- a/arbitrile.cpp +++ b/arbitrile.cpp @@ -28,6 +28,7 @@ struct arbi_tiling { vector shapes; string name; + string comment; geometryinfo1& get_geometry(); eGeometryClass get_class() { return get_geometry().kind; } @@ -77,6 +78,7 @@ void load(const string& fname) { auto& c = current; c.shapes.clear(); c.name = unnamed; + c.comment = ""; exp_parser ep; ep.s = s; ld angleunit = 1, distunit = 1, angleofs = 0; @@ -84,10 +86,17 @@ void load(const string& fname) { ep.skip_white(); if(ep.next() == 0) break; if(ep.eat("#")) { + bool doubled = ep.eat("#"); while(ep.eat(" ")) ; string s = ""; while(ep.next() >= 32) s += ep.next(), ep.at++; - if(c.name == unnamed) c.name = s; + if(doubled) { + if(c.name == unnamed) c.name = s; + else { + c.comment += s; + c.comment += "\n"; + } + } } else if(ep.eat("e2.")) { ginf[gArbitrary].g = giEuclid2; diff --git a/geom-exp.cpp b/geom-exp.cpp index 5ad40046..4dc68b50 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -803,6 +803,11 @@ EX void showEuclideanMenu() { dialog::addTitle(XLAT("info about: %1", fgname), 0xFFFFFF, 150); if(WDIM == 2 && !arb::in() && !kite::in()) dialog::addSelItem(XLAT("faces per vertex"), spf, 0); + + if(arb::in() && arb::current.comment != "") { + dialog::addBreak(100); + dialog::addHelp(arb::current.comment); + } dialog::addSelItem(XLAT("size of the world"), #if CAP_BT