mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-26 08:07:10 +00:00
dialog:: addBoolItem_action, addBoolItem_action_neg, addBoolItem_choice used when applicable
This commit is contained in:
1 parent
6fcb42d9d7
commit
3da6090320
12 files changed
+50
-79
No files matched your search
+6
-1
@@ -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; });
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user