mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-24 19:48:23 +02:00
+ SpinnerMenuView (MCI=SM)
* Some menu view rework... WIP
This commit is contained in:
parent
7a643150e7
commit
10d8812300
7 changed files with 144 additions and 33 deletions
|
@ -60,7 +60,7 @@ function MenuView(options) {
|
|||
|
||||
util.inherits(MenuView, View);
|
||||
|
||||
MenuView.prototype.redraw = function() {
|
||||
MenuView.prototype.redrawAllItems = function() {
|
||||
MenuView.super_.prototype.redraw.call(this);
|
||||
|
||||
this.cachePositions();
|
||||
|
@ -71,6 +71,19 @@ MenuView.prototype.redraw = function() {
|
|||
this.drawItem(i);
|
||||
}
|
||||
};
|
||||
/*
|
||||
|
||||
MenuView.prototype.redraw = function() {
|
||||
MenuView.super_.prototype.redraw.call(this);
|
||||
|
||||
this.cachePositions();
|
||||
|
||||
var count = this.items.length;
|
||||
for(var i = 0; i < count; ++i) {
|
||||
this.items[i].focused = this.focusedItemIndex === i;
|
||||
this.drawItem(i);
|
||||
}
|
||||
};*/
|
||||
|
||||
MenuView.prototype.setItems = function(items) {
|
||||
var self = this;
|
||||
|
@ -78,8 +91,7 @@ MenuView.prototype.setItems = function(items) {
|
|||
this.items = []; // :TODO: better way?
|
||||
items.forEach(function onItem(itemText) {
|
||||
self.items.push({
|
||||
text : itemText,
|
||||
selected : false,
|
||||
text : itemText
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue