1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-16 10:09:43 +00:00

arb:: selectable in geom-exp

This commit is contained in:
Zeno Rogue
2019-12-27 02:08:04 +01:00
parent 3afae980fd
commit ce2d8d3d29
3 changed files with 26 additions and 5 deletions

View File

@@ -365,5 +365,25 @@ auto hook = addHook(hooks_args, 100, readArgs);
EX bool in() { return geometry == gArbitrary; }
EX string tes = "tessellations/marjorie-rice.tes";
EX void choose() {
dialog::openFileDialog(tes, XLAT("open a tiling"), ".tes",
[] () {
stop_game();
set_geometry(gArbitrary);
try {
load(tes);
ginf[gArbitrary].tiling_name = current.name;
}
catch(hr_parse_exception& ex) {
println(hlog, "failed: ", ex.s);
set_geometry(gNormal);
}
start_game();
return true;
});
}
EX }
}