mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-17 11:38:05 +00:00
Warnings when hitting an ally. Better warnings
This commit is contained in:
@@ -80,11 +80,14 @@ namespace dialog {
|
||||
|
||||
map<int, reaction_t> key_actions;
|
||||
|
||||
void add_action(reaction_t action) {
|
||||
int& key = lastItem().key;
|
||||
void add_key_action(int key, const reaction_t& action) {
|
||||
while(key_actions.count(key)) key++;
|
||||
key_actions[key] = action;
|
||||
}
|
||||
|
||||
void add_action(const reaction_t& action) {
|
||||
add_key_action(lastItem().key, action);
|
||||
}
|
||||
|
||||
void handler(int sym, int uni) {
|
||||
dialog::handleNavigation(sym, uni);
|
||||
|
||||
Reference in New Issue
Block a user