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 00000000..4fa6ef7f Binary files /dev/null and b/mods/themes/NU-MAYA/MSGHDR1.ANS differ