Skip to content
Snippets Groups Projects
Commit d0bf7348 authored by echicken's avatar echicken :chicken:
Browse files

yeah

parent e162990b
No related branches found
No related tags found
No related merge requests found
...@@ -3454,7 +3454,7 @@ ...@@ -3454,7 +3454,7 @@
}, },
"node_modules/swindows": { "node_modules/swindows": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "git+ssh://git@gitlab.synchro.net:echicken/swindows.git#17b759f305b1d5079737ffe09af14f55822b9d16" "resolved": "git+ssh://git@gitlab.synchro.net:echicken/swindows.git#b7c60a8d05de2295ab9ad07f3c5f9e2ddd89d61e"
}, },
"node_modules/to-fast-properties": { "node_modules/to-fast-properties": {
"version": "2.0.0", "version": "2.0.0",
......
import type { ICgaDefs, ISbbsDefs } from '@swag/ts4s'; import type { ISbbsDefs } from '@swag/ts4s';
import { load } from '@swag/ts4s'; import { load } from '@swag/ts4s';
import { clear } from './lib/menu';
import UI from './lib/UI'; import UI from './lib/UI';
const sbbsdefs: ISbbsDefs = load('sbbsdefs.js'); const sbbsdefs: ISbbsDefs = load('sbbsdefs.js');
const cgadefs: ICgaDefs = load('cga_defs.js');
const { bbs, console, mswait } = js.global; const { bbs, console, mswait } = js.global;
const ui = new UI(); const ui = new UI();
...@@ -19,7 +19,7 @@ function init(): void { ...@@ -19,7 +19,7 @@ function init(): void {
js.time_limit = 0; js.time_limit = 0;
bbs.sys_status |= sbbsdefs.SS_MOFF; bbs.sys_status |= sbbsdefs.SS_MOFF;
console.ctrlkey_passthru = "+UPKTG"; console.ctrlkey_passthru = "+UPKTG";
console.clear(cgadefs.BG_BLACK|cgadefs.LIGHTGRAY); clear();
} }
function main(): void { function main(): void {
......
...@@ -26,6 +26,7 @@ export default class ActivityWindow extends ShellWindow { ...@@ -26,6 +26,7 @@ export default class ActivityWindow extends ShellWindow {
constructor(name: string, wm: WindowManager, position: IPosition, size: ISize, footer: IBorderText) { constructor(name: string, wm: WindowManager, position: IPosition, size: ISize, footer: IBorderText) {
super(name, wm, position, size, footer); super(name, wm, position, size, footer);
this.window.wrap = defs.WRAP.WORD; this.window.wrap = defs.WRAP.WORD;
this.window.scrollBack = { width: Infinity, height: 1000 };
this.window.write(HELP.split('\r\n').slice(1).join('\r\n')); this.window.write(HELP.split('\r\n').slice(1).join('\r\n'));
this.inputWindow = new ControlledWindow({ this.inputWindow = new ControlledWindow({
......
import type { ICgaDefs, IKeyDefs, ISbbsDefs } from '@swag/ts4s'; import type { ICgaDefs, IKeyDefs, ISbbsDefs } from '@swag/ts4s';
import type { IShellWindow } from './types';
import { load } from '@swag/ts4s'; import { load } from '@swag/ts4s';
import * as swindows from 'swindows'; import * as swindows from 'swindows';
import { IShellWindow } from './types'; import { clear } from './menu';
import ActivityWindow from './ActivityWindow'; import ActivityWindow from './ActivityWindow';
import MenuWindow from './MenuWindow'; import MenuWindow from './MenuWindow';
...@@ -129,7 +130,7 @@ export default class UI { ...@@ -129,7 +130,7 @@ export default class UI {
bbs.hangup(); bbs.hangup();
break; break;
case keydefs.CTRL_L: // Log off case keydefs.CTRL_L: // Log off
console.clear(); clear();
bbs.logout(); bbs.logout();
break; break;
// Pass input to the focused window // Pass input to the focused window
......
...@@ -3,7 +3,7 @@ import { ILightBarItem } from "swindows/src/LightBar"; ...@@ -3,7 +3,7 @@ import { ILightBarItem } from "swindows/src/LightBar";
const { bbs, file_exists, file_date, console, user, system, time, File } = js.global; const { bbs, file_exists, file_date, console, user, system, time, File } = js.global;
function clear(): void { export function clear(): void {
console.home(); console.home();
console.write('\x1B[0;37;40m'); console.write('\x1B[0;37;40m');
console.write('\x1B[2J'); console.write('\x1B[2J');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment