| 190 | } |
| 191 | |
| 192 | void KeyboardMapMenu::setKey(const BzfKeyEvent& event) { |
| 193 | if (editing == -1) { |
| 194 | return; |
| 195 | } |
| 196 | KeyKeyMap::iterator it; |
| 197 | for (it = mappable.begin(); it != mappable.end(); it++) |
| 198 | if (it->second.index == editing) { |
| 199 | break; |
| 200 | } |
| 201 | if ((KEYMGR.keyEventToString(event) == it->second.key1 && it->second.key2.empty()) |
| 202 | || (KEYMGR.keyEventToString(event) == it->second.key2)) { |
| 203 | return; |
| 204 | } |
| 205 | ActionBinding::instance().associate(KEYMGR.keyEventToString(event), |
| 206 | it->first); |
| 207 | editing = -1; |
| 208 | update(); |
| 209 | } |
| 210 | |
| 211 | void KeyboardMapMenu::execute() { |
| 212 | const HUDuiControl* const _focus = getNav().get(); |