mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-20 11:54:48 +00:00
arb:: comment displayed in geom-exp
This commit is contained in:
parent
5940851f59
commit
3afae980fd
@ -28,6 +28,7 @@ struct arbi_tiling {
|
||||
|
||||
vector<shape> 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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user