command.js: 'correct' styles for motd

This commit is contained in:
minjaesong
2024-05-15 00:33:14 +09:00
parent 49b70d65f8
commit 1a1d49fbe5
7 changed files with 16 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
Copyright (c) 2020-2022 CuriousTorvald Copyright (c) 2020-2024 CuriousTorvald
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,7 +1,3 @@
Welcome to TVDOS Installer! TVDOS (c) 2020-2024 CuriousTorvald
With this Live Boot environment you can freely try out the DOS without actual installation. The disk is write-protected so all the important files are safe.
To install the TVDOS to your disk, simply run 'install'.
TVDOS is provided "as is", without warranty of any kind; in no event shall the authors or copyright holders be liable for any claim, damages or other liabilities. Run 'less COPYING' for more information. TVDOS is provided "as is", without warranty of any kind; in no event shall the authors or copyright holders be liable for any claim, damages or other liabilities. Run 'less COPYING' for more information.

View File

@@ -0,0 +1,7 @@
Welcome to TVDOS Installer!
With this Live Boot environment you can freely try out the DOS without actual installation. The disk is write-protected so all the important files are safe.
To install the TVDOS to your disk, simply run 'install'.
TVDOS is provided "as is", without warranty of any kind; in no event shall the authors or copyright holders be liable for any claim, damages or other liabilities. Run 'less COPYING' for more information.

View File

@@ -82,7 +82,7 @@ function printmotd() {
let margin = 4 let margin = 4
let internalWidth = width - 2*margin let internalWidth = width - 2*margin
con.video_reverse() con.color_pair(255,253) // white text, transparent back (initial ribbon)
let [cy, cx] = con.getyx() let [cy, cx] = con.getyx()
@@ -91,6 +91,7 @@ function printmotd() {
const PCX_INIT = margin - 2 const PCX_INIT = margin - 2
let tcnt = 0 let tcnt = 0
let pcx = PCX_INIT let pcx = PCX_INIT
con.color_pair(240,253) // black text, white back (first line of text)
while (tcnt <= motd.length) { while (tcnt <= motd.length) {
let char = motd.charAt(tcnt) let char = motd.charAt(tcnt)
@@ -106,20 +107,22 @@ function printmotd() {
// current line ending // current line ending
let [_, ncx] = con.getyx() let [_, ncx] = con.getyx()
for (let k = 0; k < width - margin - ncx + 1; k++) print(' ') for (let k = 0; k < width - margin - ncx + 1; k++) print(' ')
con.color_pair(255,253) // white text, transparent back
con.addch(17);println() con.addch(17);println()
if (tcnt == motd.length) break if (tcnt == motd.length) break
// next line header // next line header
let [ncy, __] = con.getyx() let [ncy, __] = con.getyx()
con.mvaddch(ncy, 4, 16);con.curs_right();print(' ') con.color_pair(255,253) // white text, transparent back
con.mvaddch(ncy, 4, 16);con.curs_right();print(' ');con.color_pair(240,253) // black text, white back (subsequent lines of the text)
pcx = PCX_INIT pcx = PCX_INIT
} }
tcnt += 1 tcnt += 1
} }
con.video_reverse() con.reset_graphics()
} }
else { else {
println() println()

Binary file not shown.

Binary file not shown.

View File

@@ -69,6 +69,6 @@ public class AppLoader {
pipvm, 160, 140 pipvm, 160, 140
))));*/ ))));*/
new Lwjgl3Application(new VMGUI(reference2, WIDTH, HEIGHT), appConfig); new Lwjgl3Application(new VMGUI(reference, WIDTH, HEIGHT), appConfig);
} }
} }