mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-11 23:24:43 +02:00
* VerticalMenuView up/down working
This commit is contained in:
parent
edc8266310
commit
4f3a8ac500
3 changed files with 63 additions and 21 deletions
|
@ -11,12 +11,11 @@ exports.MenuView = MenuView;
|
|||
|
||||
function MenuView(client, options) {
|
||||
options.acceptsFocus = miscUtil.valueWithDefault(options.acceptsFocus, true);
|
||||
var self = this;
|
||||
options.acceptsInput = miscUtil.valueWithDefault(options.acceptsInput, true);
|
||||
|
||||
View.call(this, client, options);
|
||||
|
||||
this.focusedItemIndex = 0;
|
||||
|
||||
var self = this;
|
||||
|
||||
//// --- TESTING
|
||||
options.items = [ 'Login', 'Apply', 'Logout' ];
|
||||
|
@ -33,6 +32,9 @@ function MenuView(client, options) {
|
|||
});
|
||||
}
|
||||
|
||||
this.focusedItemIndex = this.options.focusedItemIndex || 0;
|
||||
this.focusedItemIndex = this.items.length >= this.focusedItemIndex ? this.focusedItemIndex : 0;
|
||||
|
||||
this.itemSpacing = this.options.itemSpacing || 1;
|
||||
this.itemSpacing = parseInt(this.itemSpacing, 10);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue