mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 06:34:41 +02:00
* Allow hot keys to be case insensitive
* Start of better demo
This commit is contained in:
parent
028c5be418
commit
3e93b5b67d
4 changed files with 52 additions and 7 deletions
|
@ -60,13 +60,13 @@ ToggleMenuView.prototype.setFocus = function(focused) {
|
|||
};
|
||||
|
||||
ToggleMenuView.prototype.onKeyPress = function(key, isSpecial) {
|
||||
if(isSpecial || !this.hotkeys) {
|
||||
if(isSpecial || !this.hotKeys) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(1 === key.length);
|
||||
|
||||
var keyIndex = this.hotkeys[key];
|
||||
var keyIndex = this.hotKeys[this.caseInsensitiveHotKeys ? key.toLowerCase() : key];
|
||||
if(!_.isUndefined(keyIndex)) {
|
||||
this.focusedItemIndex = keyIndex;
|
||||
this.updateSelection();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue