+ SpinnerMenuView (MCI=SM)

* Some menu view rework... WIP
This commit is contained in:
Bryan Ashby 2015-04-26 21:57:23 -06:00
parent 7a643150e7
commit 10d8812300
7 changed files with 144 additions and 33 deletions

View file

@ -64,7 +64,7 @@ function VerticalMenuView(options) {
self.client.term.write(ansi.goto(item.xPosition, self.position.y));
this.client.term.write(self.getANSIColor(
index === self.focusedItemIndex || item.selected ? self.getFocusColor() : self.getColor()));
index === self.focusedItemIndex ? self.getFocusColor() : self.getColor()));
var text = strUtil.stylizeString(item.text, item.focused ? self.focusTextStyle : self.textStyle);
@ -75,6 +75,10 @@ function VerticalMenuView(options) {
util.inherits(VerticalMenuView, MenuView);
VerticalMenuView.prototype.redraw = function() {
VerticalMenuView.super_.prototype.redrawAllItems.call(this);
};
VerticalMenuView.prototype.setPosition = function(pos) {
VerticalMenuView.super_.prototype.setPosition.call(this, pos);