mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-07 22:49:54 +00:00
custom:: disable/enable all option, and don't srestart the game when customizing
This commit is contained in:
parent
261800d765
commit
94bf06f7dc
18
landlock.cpp
18
landlock.cpp
@ -884,9 +884,11 @@ EX void customize_land_list() {
|
||||
if(custom_land_wandering[l] != 100) s += "^" + its(custom_land_wandering[l]) + " ";
|
||||
if(s != "") dialog::lastItem().value = s;
|
||||
dialog::add_action_confirmed([l] {
|
||||
stop_game();
|
||||
use_custom_land_list = true;
|
||||
start_game();
|
||||
if(!use_custom_land_list) {
|
||||
stop_game();
|
||||
use_custom_land_list = true;
|
||||
start_game();
|
||||
}
|
||||
pushScreen([l] { customize_land_in_list(l); });
|
||||
});
|
||||
}
|
||||
@ -900,6 +902,16 @@ EX void customize_land_list() {
|
||||
start_game();
|
||||
});
|
||||
|
||||
if(use_custom_land_list) {
|
||||
dialog::addItem("disable/enable all", 'D');
|
||||
dialog::add_action([] {
|
||||
int qty = 0;
|
||||
for(int i=0; i<landtypes; i++) if(custom_land_list[i]) qty++;
|
||||
for(int i=0; i<landtypes; i++) custom_land_list[i] = !qty;
|
||||
});
|
||||
}
|
||||
else dialog::addBreak(100);
|
||||
|
||||
dialog::addHelp();
|
||||
dialog::add_action([] {
|
||||
gotoHelp(XLAT(
|
||||
|
Loading…
Reference in New Issue
Block a user