Skip to content
Snippets Groups Projects
Commit e4182636 authored by nightfox's avatar nightfox
Browse files

The main function now updates bbs.node_action to NODE_LFIL to indicate that...

The main function now updates bbs.node_action to NODE_LFIL to indicate that the user is listing files.  bbs.node_action is restored to the previous value upon exit of the main function.
Also I forgot to mention in my last commit that I added an optional command-line argument to specify a file directory internal code so that this script can (optionally) start at the file list for a file directory rather than the file group chooser.  This allows a command shell to run this script for the 'List files in directory' command (with bbs.curdir_code as the first argument).
parent 3459e759
Branches
Tags
No related merge requests found
// Lightbar file library/directory browser
load("sbbsdefs.js");
load("nodedefs.js");
load("cga_defs.js"); // For color definitions
load("file_size.js");
load("filedir.js");
......@@ -661,6 +662,9 @@ var init = function() {
}
var main = function() {
var previousNodeAction = bbs.node_action;
bbs.node_action = NODE_LFIL;
bbs.nodesync();
while(!js.terminated) {
var userInput = console.inkey(K_NONE, 5);
if(!inputHandler(userInput)) {
......@@ -670,6 +674,8 @@ var main = function() {
if(frame.cycle())
console.gotoxy(console.screen_columns, console.screen_rows);
}
bbs.node_action = previousNodeAction;
bbs.nodesync();
}
var cleanUp = function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment