mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-13 23:18:16 +00:00
more elegant advanced field parameters
This commit is contained in:
parent
82083ba83d
commit
4333acf54d
11
geom-exp.cpp
11
geom-exp.cpp
@ -51,7 +51,16 @@ void showQuotientConfig() {
|
||||
string stars[3] = {"", "*", "**"};
|
||||
for(int i=0; i<isize(gxcur.primes); i++) {
|
||||
auto& p = gxcur.primes[i];
|
||||
dialog::addBoolItem(XLAT("order %1%2 (pure cells: %3)", its(p.p), p.squared ? "²" : "", its(p.cells)) + stars[gxcur.dualval[i]], i == gxcur.current_prime_id, 'A'+i);
|
||||
|
||||
int sides = ginf[gxcur.base].sides;
|
||||
bool sa = shapename_available(sides);
|
||||
string s = sa ? "order %1%2 (%3 %4s)" : "order %1%2 (%3 %4-gons)";
|
||||
|
||||
s = XLAT(s, its(p.p), p.squared ? "²" : "", its(p.cells), sa ? shapename(sides) : its(sides));
|
||||
|
||||
s += stars[gxcur.dualval[i]];
|
||||
|
||||
dialog::addBoolItem(s, i == gxcur.current_prime_id, 'A'+i);
|
||||
}
|
||||
|
||||
if(isize(gxcur.primes) <= 6) {
|
||||
|
@ -385,4 +385,12 @@ EX string XLAT1(string x) {
|
||||
|
||||
EX string XLATT1(stringpar p) { return XLAT1(p.v); }
|
||||
|
||||
EX bool shapename_available(int id) { return id >= 3 && id < 9; }
|
||||
|
||||
EX string shapename(int id) {
|
||||
if(!shapename_available(id)) return "";
|
||||
string english[9] = {"", "", "digon", "triangle", "square", "pentagon", "hexagon", "heptagon", "octagon"};
|
||||
return english[id];
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user