From 8c7d609abb2daebb2b4d4f7cfc848290b754df55 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Wed, 24 Jun 2015 23:09:26 -0600 Subject: [PATCH] * Start skeleton work on message editor module --- mods/menu.json | 9 +++++++- mods/message_editor.js | 36 +++++++++++++++++++++++++++++--- mods/themes/NU-MAYA/MSGHDR1.ANS | Bin 0 -> 199 bytes 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 mods/themes/NU-MAYA/MSGHDR1.ANS diff --git a/mods/menu.json b/mods/menu.json index 4acca8af..7ac658f3 100644 --- a/mods/menu.json +++ b/mods/menu.json @@ -432,7 +432,14 @@ }, "demoMessageEditor" : { "module" : "message_editor", - "options" : { "cls" : true } + "options" : { "cls" : true }, + "args" : { + "art" : { + "header" : "MSGHDR", + "body" : "MSGBODY", + "footer" : "MSGFTR" + } + } } /* diff --git a/mods/message_editor.js b/mods/message_editor.js index d44153da..73481781 100644 --- a/mods/message_editor.js +++ b/mods/message_editor.js @@ -3,6 +3,10 @@ var MenuModule = require('../core/menu_module.js').MenuModule; +var async = require('async'); +var assert = require('assert'); +var _ = require('lodash'); + exports.getModule = MessageEditorModule; exports.moduleInfo = { @@ -11,8 +15,34 @@ exports.moduleInfo = { author : 'NuSkooler', }; -function MessageEditorModule(menuConfig) { - MenuModule.call(this, menuConfig); +function MessageEditorModule(options) { + MenuModule.call(this, options); + + var self = this; + var args = options.menuConfig.args; + + this.initSequence = function() { + async.waterfall( + [ + function beforeDisplayArt(callback) { + self.beforeArt(); + callback(null); + }, + function displayHeader(callback) { + if(_.isString(args.art.header)) { + self.displayArtAsset(args.art.header, function hdrDisplayed(err, mciMap) { + + }); + } + } + ] + ); + }; } -require('util').inherits(MessageEditorModule, MenuModule); \ No newline at end of file +require('util').inherits(MessageEditorModule, MenuModule); + +MessageEditorModule.prototype.enter = function(client) { + MessageEditorModule.super_.prototype.enter.call(this, client); +}; + diff --git a/mods/themes/NU-MAYA/MSGHDR1.ANS b/mods/themes/NU-MAYA/MSGHDR1.ANS new file mode 100644 index 0000000000000000000000000000000000000000..4fa6ef7f87f6b7f1ebe18266ad37dfdf77c823df GIT binary patch literal 199 zcmb1+Hn27^ur@Z&4avwXRsf1ZPp=it($ zEGu3vx1#)9kbsf1rwfoP73>)5>}p`3Ks{h&U}$P!W@O^Vz`(%B7{I^`q=7)#)5%vM K%-s>fgOdQWn