mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 23:50:27 +00:00
edit_stretch function
This commit is contained in:
parent
57b5d03695
commit
f56b15a5ee
24
geom-exp.cpp
24
geom-exp.cpp
@ -686,6 +686,18 @@ EX void menuitem_nilwidth(char key) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX void edit_stretch() {
|
||||||
|
stretch::mstretch = false;
|
||||||
|
ray::reset_raycaster();
|
||||||
|
dialog::editNumber(stretch::factor, -1, 9, 0.1, 0, XLAT("stretched geometry"),
|
||||||
|
XLAT(
|
||||||
|
"Stretch the metric along the fibers. This can currently be done in rotation spaces and in 8-cell, 24-cell and 120-cell. "
|
||||||
|
"Value of 0 means not stretched, -1 means S2xE or H2xE (works only in the limit). (Must be > -1)"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
dialog::reaction = [] { if(abs(stretch::factor+1) < 1e-3) stretch::factor = -.9; ray::reset_raycaster(); };
|
||||||
|
}
|
||||||
|
|
||||||
EX void showEuclideanMenu() {
|
EX void showEuclideanMenu() {
|
||||||
// for(int i=2; i<lt; i++) landvisited[i] = true;
|
// for(int i=2; i<lt; i++) landvisited[i] = true;
|
||||||
|
|
||||||
@ -990,17 +1002,7 @@ EX void showEuclideanMenu() {
|
|||||||
|
|
||||||
if(stretch::applicable()) {
|
if(stretch::applicable()) {
|
||||||
dialog::addSelItem(XLAT("stretched geometry"), fts(stretch::factor), 'S');
|
dialog::addSelItem(XLAT("stretched geometry"), fts(stretch::factor), 'S');
|
||||||
dialog::add_action([] {
|
dialog::add_action(edit_stretch);
|
||||||
stretch::mstretch = false;
|
|
||||||
ray::reset_raycaster();
|
|
||||||
dialog::editNumber(stretch::factor, -1, 9, 0.1, 0, XLAT("stretched geometry"),
|
|
||||||
XLAT(
|
|
||||||
"Stretch the metric along the fibers. This can currently be done in rotation spaces and in 8-cell, 24-cell and 120-cell. "
|
|
||||||
"Value of 0 means not stretched, -1 means S2xE or H2xE (works only in the limit). (Must be > -1)"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
dialog::reaction = ray::reset_raycaster;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
|
Loading…
Reference in New Issue
Block a user