1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 05:17:17 +00:00

config:: reaction called on edit for list settings

This commit is contained in:
Zeno Rogue 2022-02-26 09:51:33 +01:00
parent 5a67e7c040
commit 961b09033f

View File

@ -2881,7 +2881,7 @@ void list_setting::show_edit_option(char key) {
int q = isize(options);
for(int i=0; i<q; i++) {
dialog::addBoolItem(XLAT(options[i].first), get_value() == i, 'a'+i);
dialog::add_action([this, i] { set_value(i); popScreen(); });
dialog::add_action([this, i] { set_value(i); if(reaction) reaction(); popScreen(); });
dialog::addBreak(100);
if(options[i].second != "") {
dialog::addHelp(XLAT(options[i].second));