Skip to content
Snippets Groups Projects
Commit ecfd1e1d authored by Nigel Reed's avatar Nigel Reed
Browse files

More changes for MODE7

Updates for Mode 7 graphics
parent 2a1bc83e
No related branches found
No related tags found
1 merge request!499Initial changes to support MODE7 graphics natively
......@@ -7,6 +7,7 @@
// @format.tab-size 4, @format.use-tabs true
require("sbbsdefs.js", "P_NOERROR");
require("gettext.js", 'gettext');
"use strict";
......@@ -48,7 +49,7 @@ if(bull.length < 1) {
while(bbs.online && !js.terminated) {
if(bbs.menu("../bullseye", P_NOERROR)) {
console.mnemonics("\r\nEnter number of bulletin or [~Quit]: ");
console.mnemonics(gettext("\r\nEnter number of bulletin or [~Quit]: "));
b = console.getnum(bull.length);
} else {
for(i = 0; i < bull.length; ++i)
......
......@@ -67,6 +67,7 @@ for(var c=0; c < options.login_prompts; c++) {
if(!str.length) // blank
continue;
// New user application?
if(str.toUpperCase()=="NEW") {
if(bbs.newuser()) {
......
......@@ -12,10 +12,6 @@
require("sbbsdefs.js", 'SS_RLOGIN');
require("nodedefs.js", 'NODE_QUIET');
if(console.term_supports(USER_MODE7)) {
log(LOG_DEBUG, "Setting users language to m7");
user.lang = "m7";
}
if(!bbs.mods.avatar_lib)
bbs.mods.avatar_lib = load({}, 'avatar_lib.js');
......
......@@ -45,13 +45,6 @@ if(!js.global.bbs) {
if(!bbs.mods.logonlist_lib)
bbs.mods.logonlist_lib = load({}, 'logonlist_lib.js');
var options = load("modopts.js", "logonlist");
function dump_objs(obj) {
Object.keys(obj).forEach(function (e) {
writeln(e + ': ' + JSON.stringify(obj[e]));
});
}
dump_objs(options);
writeln("lang: " + user.lang);
if(!options)
options = {};
if(options.last_few_callers === undefined)
......
......@@ -8,6 +8,10 @@ const yes_key = yes_str[0];
const no_str = bbs.text(bbs.text.No);
const no_key = no_str[0];
var options = load("modopts.js", "noyesbar");
if(!options)
options = {};
while(console.question.substring(0, 2) == "\r\n") {
console.crlf();
console.question = console.question.substring(2);
......@@ -18,17 +22,20 @@ if(console.question.substring(0, 2) == "\x01\?") {
console.question = console.question.substring(2);
}
console.putmsg("\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? @CLEAR_HOT@", P_NOABORT);
console.putmsg(options.noyes_question || "\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? @CLEAR_HOT@", P_NOABORT);
var affirm = false;
while(bbs.online && !js.terminated) {
var str;
if(affirm)
str = format("\x01n\x01b\x01h \x01~%s \x014\x01w\x01e[\x01~%s]", no_str, yes_str);
str = format(options.highlight_yes_fmt || "\x01n\x01b\x01h \x01~%s \x014\x01w\x01e[\x01~%s]", no_str, yes_str);
else
str = format("\x01h\x014\x01w\x01e[\x01~%s]\x01n\x01b\x01h \x01~%s ", no_str, yes_str);
str = format(options.highlight_no_fmt || "\x01h\x014\x01w\x01e[\x01~%s]\x01n\x01b\x01h \x01~%s ", no_str, yes_str);
console.print(str);
var key = console.getkey(0).toUpperCase();
console.backspace(console.strlen(str));
if(console.term_supports(USER_MODE7))
console.print(" ");
else
console.print("\x01n\x01h\x01>");
if(console.aborted)
break;
......
// JS version of yesnobar.src
require("sbbsdefs.js", "P_NOABORT");
"use strict";
......@@ -9,6 +8,10 @@ const yes_key = yes_str[0];
const no_str = bbs.text(bbs.text.No);
const no_key = no_str[0];
var options = load("modopts.js", "yesnobar");
if(!options)
options = {};
while(console.question.substring(0, 2) == "\r\n") {
console.crlf();
console.question = console.question.substring(2);
......@@ -19,18 +22,22 @@ if(console.question.substring(0, 2) == "\x01\?") {
console.question = console.question.substring(2);
}
console.putmsg("\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? @CLEAR_HOT@", P_NOABORT);
console.putmsg(options.yesno_question || "\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? @CLEAR_HOT@", P_NOABORT);
var affirm = true;
while(bbs.online && !js.terminated) {
var str;
if(affirm)
str = format("\x01h\x014\x01w\x01e[\x01~%s]\x01n\x01b\x01h \x01~%s ", yes_str, no_str);
str = format(options.highlight_yes_fmt || "\x01n\x01b\x01h \x01~%s \x014\x01w\x01e[\x01~%s]", no_str, yes_str);
else
str = format("\x01n\x01b\x01h \x01~%s \x014\x01w\x01e[\x01~%s]", yes_str, no_str);
str = format(options.highlight_no_fmt || "\x01h\x014\x01w\x01e[\x01~%s]\x01n\x01b\x01h \x01~%s ", no_str, yes_str);
console.print(str);
var key = console.getkey(0).toUpperCase();
console.backspace(console.strlen(str));
if(console.term_supports(USER_MODE7))
console.print(" ");
else
console.print("\x01n\x01h\x01>");
if(console.aborted)
break;
if(key == '\r')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment