From e418263671b7dab8511aa20f41a1165524affd43 Mon Sep 17 00:00:00 2001 From: nightfox <> Date: Sun, 11 Mar 2018 00:30:37 +0000 Subject: [PATCH] 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). --- exec/filearea-lb.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/exec/filearea-lb.js b/exec/filearea-lb.js index aa5d2a05a0..a3f1d05fdb 100644 --- a/exec/filearea-lb.js +++ b/exec/filearea-lb.js @@ -1,5 +1,6 @@ // 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() { -- GitLab