config:: fixed bool_setting::editable and reaction

This commit is contained in:
Zeno Rogue 2021-02-06 01:19:01 +01:00
parent f415c5f9f1
commit 50cb77e413
1 changed files with 3 additions and 3 deletions

View File

@ -164,7 +164,7 @@ struct bool_setting : public setting {
bool dft;
void add_as_saver();
reaction_t switcher;
void editable(string cap, char key ) { menu_item_name = cap; default_key = key; }
bool_setting* editable(string cap, char key ) { menu_item_name = cap; default_key = key; return this; }
virtual bool affects(void *v) override { return v == value; }
virtual void show_edit_option(char key) override;
virtual cld get_cld() { return *value ? 1 : 0; }
@ -309,7 +309,7 @@ void float_setting::show_edit_option(char key) {
add_to_changed(this);
dialog::editNumber(*value, min_value, max_value, step, dft, XLAT(menu_item_name), help_text);
if(sets) sets();
if(reaction) reaction();
if(reaction) dialog::reaction = reaction;
});
}
@ -320,7 +320,7 @@ void int_setting::show_edit_option(char key) {
add_to_changed(this);
dialog::editNumber(*value, min_value, max_value, step, dft, XLAT(menu_item_name), help_text);
if(sets) sets();
if(reaction) reaction();
if(reaction) dialog::reaction = reaction;
});
}