mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-29 06:20:41 +00:00
dialog:: addBoolItem_action
This commit is contained in:
parent
7ce880b680
commit
4791fd018e
@ -1087,6 +1087,10 @@ namespace dialog {
|
|||||||
dialog::display();
|
dialog::display();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addBoolItem_action(const string& s, bool& b, char c) {
|
||||||
|
dialog::addBoolItem(s, b, c);
|
||||||
|
dialog::add_action([&b] { b = !b; });
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
1
hyper.h
1
hyper.h
@ -1973,6 +1973,7 @@ namespace dialog {
|
|||||||
void add_key_action(int key, const reaction_t& action);
|
void add_key_action(int key, const reaction_t& action);
|
||||||
|
|
||||||
void add_action_push(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();
|
string view_edited_string();
|
||||||
void start_editing(string& s);
|
void start_editing(string& s);
|
||||||
|
Loading…
Reference in New Issue
Block a user