1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-22 05:03:19 +00:00

dialog:: addBoolItem_action

This commit is contained in:
Zeno Rogue 2019-05-03 11:44:15 +02:00
parent 7ce880b680
commit 4791fd018e
2 changed files with 5 additions and 0 deletions

View File

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

View File

@ -1973,6 +1973,7 @@ namespace dialog {
void add_key_action(int key, const reaction_t& action);
void add_action_push(const reaction_t& action);
void addBoolItem_action(const string& s, bool& b, char c);
string view_edited_string();
void start_editing(string& s);