From ea8061ae8510a4f760d6ac465c8f213593c30121 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 11 Oct 2015 23:26:27 -0600 Subject: [PATCH] * Skeleton for user configuration --- core/user_config.js | 40 +++++++++++++++++++ mods/menu.hjson | 12 ++++-- mods/msg_list.js | 2 +- mods/themes/luciano_blocktronics/CONFSCR.ANS | Bin 0 -> 1565 bytes 4 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 core/user_config.js create mode 100644 mods/themes/luciano_blocktronics/CONFSCR.ANS diff --git a/core/user_config.js b/core/user_config.js new file mode 100644 index 00000000..4248e840 --- /dev/null +++ b/core/user_config.js @@ -0,0 +1,40 @@ +/* jslint node: true */ +'use strict'; + +var MenuModule = require('./menu_module.js').MenuModule; +var ViewController = require('./view_controller.js').ViewController; + +var async = require('async'); +var assert = require('assert'); +var _ = require('lodash'); + +exports.getModule = UserConfigModule; + +exports.moduleInfo = { + name : 'User Configuration', + desc : 'Module for user configuration', + author : 'NuSkooler', +}; + +function UserConfigModule(options) { + MenuModule.call(this, options); + + var self = this; + + +} + +require('util').inherits(UserConfigModule, MenuModule); + +UserConfigModule.prototype.mciReady = function(mciData, cb) { + var self = this; + var vc = self.viewControllers.allViews = new ViewController( { client : self.client} ); + + async.series( + [ + function callParentMciReady(callback) { + UserConfigModule.super_.prototype.mciReady.call(self, mciData, callback); + } + ] + ); +}; diff --git a/mods/menu.hjson b/mods/menu.hjson index 86aaafc5..ae30e309 100644 --- a/mods/menu.hjson +++ b/mods/menu.hjson @@ -409,9 +409,6 @@ }, mainMenu: { art: MMENU - /*options: { - trailingLF: yes - }*/ desc: Main Menu prompt: menuCommand "submit" : [ @@ -441,6 +438,10 @@ "value" : { "command" : "M" }, "action" : "@menu:messageArea" }, + { + value: { command: "C" } + action: @menu:mainMenuUserConfig + } { "value" : 1, "action" : "@menu:mainMenu" @@ -455,7 +456,10 @@ mainMenuUserStats: { art: STATUS options: { pause: true } - next: mainMenu + } + mainMenuUserConfig: { + module: @systemModule:user_config + art: CONFSCR } /////////////////////////////////////////////////////////////////////// // Message Area Related diff --git a/mods/msg_list.js b/mods/msg_list.js index 2e2e2710..bf5cfdd9 100644 --- a/mods/msg_list.js +++ b/mods/msg_list.js @@ -110,7 +110,7 @@ MessageListModule.prototype.mciReady = function(mciData, cb) { async.series( [ function callParentMciReady(callback) { - MessageListModule.super_.prototype.mciReady.call(this, mciData, callback); + MessageListModule.super_.prototype.mciReady.call(self, mciData, callback); }, function loadFromConfig(callback) { var loadOpts = { diff --git a/mods/themes/luciano_blocktronics/CONFSCR.ANS b/mods/themes/luciano_blocktronics/CONFSCR.ANS new file mode 100644 index 0000000000000000000000000000000000000000..f43c59a6861104e31f07112975a4109b8b085665 GIT binary patch literal 1565 zcmb_cy=vS*7(5qg45^YTYW5LUcPFX1%2`545eS5&QFSpgJ~-KsGX(N1c?jdzkzijX zGxP20boP-dDx}^0{$}R;Rz>SKYrk3f{`Ffi6>s{HNNNJ{sAfQ36hVmwRyB+ei+4uesP zV;s&^5Ff%(A=Re-GcHO6`Qvm}CzkHS4Q4Y?6MJxkhFKg^r|wxUt4G#HX4(HA(&sef z3!adjD|8J6$+QY+AN0tCqCNC_UMCZKddhW=?WDg+uQ*Lv5+FDHgqCgaHl1c;Y6$1G zk4mR5Pih%&r&+@6HobbLHo8%bY{KBwWCMo=)IsBH7lCq0W#R{x$H%P03mVw~Rvdf) z%p@~!#7i~K1G)QN@?ymf&*EpXGOb0RD^ORtFbF-M*R%9xRr<30 a^J=lUxcIVoyU_FI)BDfv`^PKWP4B;Q?G^n1 literal 0 HcmV?d00001