mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
command.js: 'correct' styles for motd
This commit is contained in:
@@ -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
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
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 (c) 2020-2024 CuriousTorvald
|
||||
|
||||
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.
|
||||
7
assets/disk0/etc/motd.installer
Normal file
7
assets/disk0/etc/motd.installer
Normal 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.
|
||||
@@ -82,7 +82,7 @@ function printmotd() {
|
||||
let margin = 4
|
||||
let internalWidth = width - 2*margin
|
||||
|
||||
con.video_reverse()
|
||||
con.color_pair(255,253) // white text, transparent back (initial ribbon)
|
||||
|
||||
let [cy, cx] = con.getyx()
|
||||
|
||||
@@ -91,6 +91,7 @@ function printmotd() {
|
||||
const PCX_INIT = margin - 2
|
||||
let tcnt = 0
|
||||
let pcx = PCX_INIT
|
||||
con.color_pair(240,253) // black text, white back (first line of text)
|
||||
while (tcnt <= motd.length) {
|
||||
let char = motd.charAt(tcnt)
|
||||
|
||||
@@ -106,20 +107,22 @@ function printmotd() {
|
||||
// current line ending
|
||||
let [_, ncx] = con.getyx()
|
||||
for (let k = 0; k < width - margin - ncx + 1; k++) print(' ')
|
||||
con.color_pair(255,253) // white text, transparent back
|
||||
con.addch(17);println()
|
||||
|
||||
if (tcnt == motd.length) break
|
||||
|
||||
// next line header
|
||||
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
|
||||
}
|
||||
|
||||
tcnt += 1
|
||||
}
|
||||
|
||||
con.video_reverse()
|
||||
con.reset_graphics()
|
||||
}
|
||||
else {
|
||||
println()
|
||||
|
||||
Reference in New Issue
Block a user