Updat help, add license

This commit is contained in:
2024-10-02 01:46:23 +02:00
parent 89d0e2ca0e
commit 3211e55e05
3 changed files with 727 additions and 39 deletions

View File

@ -50,9 +50,6 @@ class MessageBox
if ($ch == "\x03") {
$showing = false;
}
if ($ch == "\r") {
$showing = false;
}
} else {
if ($ch == "k{UP}") {
$this->scroll--;
@ -90,11 +87,25 @@ class MessageBox
;
for ($n = 0; $n < $visibleItems; $n++) {
if (isset($wrapped[$n+$this->scroll])) {
$item = " " . $wrapped[$n+$this->scroll]??null;
$line = $wrapped[$n+$this->scroll]??null;
if (str_starts_with($line, "# ")) {
$item = " " . mb_substr($line, 2);
$pre = "\e[1;4m"; $post = "\e[22;24m";
} elseif (str_starts_with($line, "## ")) {
$item = " " . mb_substr($line, 3);
$pre = "\e[1m"; $post = "\e[22m";
} elseif (str_starts_with($line, "### ")) {
$item = " " . mb_substr($line, 4);
$pre = "\e[1;3m"; $post = "\e[23m";
} else {
$item = " " . $line;
$pre = null; $post = null;
}
$item = $item . str_repeat(" ", $width - 2 - mb_strlen($item)) . "\e[40;37m";
} else {
$item = str_repeat(" ", $width - 2)."\e[40;37m";
}
$item = $pre . $item . $post;
if ($n >= $thumbTop && $n <= $thumbBottom) {
$scrollbar = "\e[97;1m".self::U_EDGE_VERTICAL_THUMB."\e[40;37;22m";
} else {