mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-10 15:59:53 +00:00
product config dialog
This commit is contained in:
parent
fedfb5dd20
commit
42a41835dc
16
geom-exp.cpp
16
geom-exp.cpp
@ -480,20 +480,8 @@ EX void select_quotient() {
|
|||||||
asonov::prepare_config();
|
asonov::prepare_config();
|
||||||
pushScreen(asonov::show_config);
|
pushScreen(asonov::show_config);
|
||||||
}
|
}
|
||||||
else if(prod) {
|
else if(prod)
|
||||||
static int s;
|
pushScreen(product::show_config);
|
||||||
s = product::csteps;
|
|
||||||
dialog::editNumber(s, 0, 16, 1, 0, XLAT("%1 period", "Z"),
|
|
||||||
XLAT("Set to 0 to make it non-periodic."));
|
|
||||||
dialog::bound_low(0);
|
|
||||||
dialog::reaction_final = [] {
|
|
||||||
product::csteps = s;
|
|
||||||
if(product::csteps == cgi.steps) return;
|
|
||||||
hybrid::reconfigure();
|
|
||||||
start_game();
|
|
||||||
println(hlog, "csteps = ", cgi.steps);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
vector<eGeometry> choices;
|
vector<eGeometry> choices;
|
||||||
for(int i=0; i<isize(ginf); i++) if(same_tiling(eGeometry(i))) choices.push_back(eGeometry(i));
|
for(int i=0; i<isize(ginf); i++) if(same_tiling(eGeometry(i))) choices.push_back(eGeometry(i));
|
||||||
|
@ -1375,6 +1375,44 @@ EX namespace product {
|
|||||||
return zshift(res, h[2]);
|
return zshift(res, h[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX void show_config() {
|
||||||
|
cmode = sm::SIDE | sm::MAYDARK;
|
||||||
|
gamescreen(1);
|
||||||
|
dialog::init(XLAT("quotient product spaces"));
|
||||||
|
dialog::addSelItem(XLAT("%1 period", "Z"), its(product::csteps), 'z');
|
||||||
|
dialog::add_action([] {
|
||||||
|
static int s;
|
||||||
|
s = product::csteps;
|
||||||
|
dialog::editNumber(s, 0, 16, 1, 0, XLAT("%1 period", "Z"),
|
||||||
|
XLAT("Set to 0 to make it non-periodic."));
|
||||||
|
dialog::bound_low(0);
|
||||||
|
dialog::reaction_final = [] {
|
||||||
|
product::csteps = s;
|
||||||
|
if(product::csteps == cgi.steps) return;
|
||||||
|
hybrid::reconfigure();
|
||||||
|
start_game();
|
||||||
|
println(hlog, "csteps = ", cgi.steps);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
dialog::addSelItem(XLAT("rotation"), its(product::cspin), 'r');
|
||||||
|
dialog::add_action([] {
|
||||||
|
static int s;
|
||||||
|
dialog::editNumber(s, 0, 16, 1, 0, XLAT("rotation", "Z"),
|
||||||
|
XLAT("Works if the underlying space is symmetric.")
|
||||||
|
);
|
||||||
|
dialog::reaction_final = [] {
|
||||||
|
if(s == product::cspin) return;
|
||||||
|
stop_game();
|
||||||
|
product::cspin = s;
|
||||||
|
start_game();
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog::addBreak(50);
|
||||||
|
dialog::addBack();
|
||||||
|
dialog::display();
|
||||||
|
}
|
||||||
|
|
||||||
EX }
|
EX }
|
||||||
|
|
||||||
EX namespace slr {
|
EX namespace slr {
|
||||||
|
Loading…
Reference in New Issue
Block a user