Skip to content
Snippets Groups Projects
Commit 6d00b872 authored by rswindell's avatar rswindell
Browse files

Detect a 'Q'uit sooner in the demo mode.

parent 4f795e85
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
// Utility module for creating and displaying XBin image files.
load('sbbsdefs.js');
var image_lib = load({}, 'xbimage_lib.js');
var bmplib = load({}, 'bmp_lib.js');
var cga = load({}, 'cga_defs.js');
......@@ -140,7 +141,10 @@ function demo(filename, delay)
if(global.name) {
print("\1n\1hDemonstration beginning: \1y" + global.name + "\1w (Hit '\1cQ\1w' to abort)");
console.inkey(0, delay);
var key = console.inkey(K_UPPER, delay);
console.line_counter = 0;
if(key == 'Q')
return true;
}
if(global.delay === undefined)
global.delay = delay;
......@@ -173,6 +177,7 @@ function demo(filename, delay)
if(global.name) {
print("\1n\1hDemonstration concluded: \1y" + global.name);
console.inkey(0, delay);
console.line_counter = 0;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment