mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-06 08:24:06 +00:00
rogueviz::fifteen:: use save_load_ext and load_level_ext
This commit is contained in:
parent
5bb01a919e
commit
f6c42f9c79
@ -246,17 +246,15 @@ void edit_fifteen() {
|
|||||||
|
|
||||||
dialog::addItem("save this puzzle", 'S');
|
dialog::addItem("save this puzzle", 'S');
|
||||||
dialog::add_action([] {
|
dialog::add_action([] {
|
||||||
mapstream::saveMap("fifteen-test.lev");
|
mapeditor::save_level_ext(fname, [] {});
|
||||||
#if ISWEB
|
|
||||||
offer_download("fifteen.lev", "mime/type");
|
|
||||||
#endif
|
|
||||||
});
|
});
|
||||||
|
|
||||||
dialog::addItem("load a puzzle", 'L');
|
dialog::addItem("load a puzzle", 'L');
|
||||||
dialog::add_action([] {
|
dialog::add_action([] {
|
||||||
#if ISWEB
|
auto q = quitter;
|
||||||
offer_choose_file([] {
|
mapeditor::load_level_ext(fname, [q] {
|
||||||
mapstream::loadMap("data.txt");
|
for(auto& p: puzzles) if(fname == p.full_filename()) current_puzzle = &p;
|
||||||
|
quitter = q;
|
||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
mapstream::loadMap("fifteen-test.lev");
|
mapstream::loadMap("fifteen-test.lev");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user