* Start work on allowing pipe codes & custom drawing using items vs focusItems for menus. EXPERIMENTAL.

This commit is contained in:
Bryan Ashby
2015-08-25 23:17:09 -06:00
parent 64c8d83559
commit 9442760679
10 changed files with 171 additions and 20 deletions

View File

@@ -153,11 +153,11 @@ function AbracadabraModule(options) {
self.client.term.write(ansi.resetScreen());
doorInstance.run();
}
};
this.fallbackModule = function() {
self.client.gotoMenuModule( { name : self.menuConfig.fallback } );
}
};
}
require('util').inherits(AbracadabraModule, MenuModule);

Binary file not shown.

View File

@@ -571,9 +571,7 @@
"Vertical Menu Views",
"Horizontal Menu Views",
"Art Display",
"Full Screen Editor",
"Some More Stuff",
"Other"
"Full Screen Editor"
],
"height" : 10,
"itemSpacing" : 1,
@@ -599,6 +597,10 @@
"value" : { "1" : 3 },
"action" : "@menu:demoMultiLineEditTextView"
},
{
"value" : { "1" : 4 },
"action" : "@menu:demoVerticalMenuView"
},
{
"value" : { "1" : 5 },
"action" : "@menu:demoHorizontalMenuView"
@@ -817,6 +819,53 @@
}
}
},
"demoVerticalMenuView" : {
"art" : "demo_vertical_menu_view1.ans",
"options" : { "cls" : true },
"form" : {
"0" : {
"BTVM" : {
"mci" : {
"VM1" : {
"items" : [
"|33Oblivion/2",
"|33iNiQUiTY",
"|33ViSiON/X"
],
"focusItems" : [
"|33Oblivion|01/|00|332",
"|01|33i|00|33N|01i|00|33QU|01i|00|33TY",
"|33ViSiON/X"
]
//
// :TODO: how to do the following:
// 1) Supply a view a string for a standard vs focused item
// "items" : [...], "focusItems" : [ ... ] ?
// "draw" : "@method:drawItemX", then items: [...]
},
"BT5" : {
"text" : "< Back"
}
},
"submit" : {
"*" : [
{
"value" : 5,
"action" : "@menu:demoMain"
}
]
},
"actionKeys" : [
{
"keys" : [ "escape" ],
"viewId" : 5
}
]
}
}
}
},
"demoArtDisplay" : {
"art" : "demo_selection_vm.ans",
"options" : { "cls" : true },

View File

@@ -68,10 +68,6 @@ AreaPostFSEModule.prototype.enter = function(client) {
};
AreaPostFSEModule.prototype.validateToUserName = function(un, cb) {
console.log('bazinga')
var self = this;
if(!self.isLocalEmail()) {

39
mods/msg_list.js Normal file
View File

@@ -0,0 +1,39 @@
/* jslint node: true */
'use strict';
var MenuModule = require('../core/menu_module.js').MenuModule;
exports.getModule = MessageListModule;
exports.moduleInfo = {
name : 'Message List',
desc : 'Module for listing/browsing available messages',
author : 'NuSkooler',
};
//
// :TODO:
// * Avail data:
// To
// From
// Subject
// Date
// Status (New/Read)
// Message Num (Area)
// Message Total (Area)
// Message Area desc
// Message Area Name
//
// Ideas
// * Module config can define custom formats for items & focused items (inc. Pipe Codes)
// * Single list view
// *
function MessageListModule(options) {
MenuModule.call(this, options);
var self = this;
}
require('util').inherits(MessageListModule, MenuModule);