Updat help, add license
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user