dialog:: addBoolItem_action, addBoolItem_action_neg, addBoolItem_choice used when applicable

This commit is contained in:
Zeno Rogue committed 2019-09-12 22:43:00 +02:00
1 parent 6fcb42d9d7
commit 3da6090320
12 files changed
+50 -79

No files matched your search

+6 -1
View File
@@ -1087,10 +1087,15 @@ namespace dialog {
dialog::display();
}
void addBoolItem_action(const string& s, bool& b, char c) {
void addBoolItem_action(const string& s, bool& b, char c) {
dialog::addBoolItem(s, b, c);
dialog::add_action([&b] { b = !b; });
}
void addBoolItem_action_neg(const string& s, bool& b, char c) {
dialog::addBoolItem(s, !b, c);
dialog::add_action([&b] { b = !b; });
}
};
}