⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 andy-txt.pl

📁 AndyChat 是一种用Perl 来编写的多协议的控制台聊天程序。它的目的在于提供一种共同的控制台界面
💻 PL
字号:
## Andy Text Stuff (ie. scrolling and waiting for input - to be used only with Curses::)## Started on 9th of February, 2000# 10th of February - 12.55pm - Complete?#sub ScrollText {  my ($x1, $x2, $x3, $x4, $x5, $x10) = @_;  my ($x6, $x7, $x8);  $x6 = wherex; $x7 = wherey; # $x8 = $mainwin->attr_get(); $x8 = $attr_t;  while ($x4 > length($x1)) { $x1 = "$x1$x1"; }  if ($x10 ne $lastx10) { $x9 = 0; }  while (not keypressed()) {    if ($startcomplete) { DoIdleLoop; }    $x9++; if ($x9 > length($x1)) { $x9 = 1; }    gotoxy($x2, $x3);    if ($x9 + $x4 > length($x1)) {      addstr(substr($x1, $x9 - 1, length($x1) - $x9 + 1));      addstr(substr($x1, 0, $x9 + $x4 - length($x1) - 1));    }    else    {      addstr(substr($x1, $x9 - 1, $x4));    }    gotoxy($x6, $x7); refresh();#    sleep $x5;    $ri = time(); while ((time() - $ri < $x5) && (not keypressed())) { sleep(0.01); }  }  if ($x10) { gotoxy($x2, $x3); LordWrite($x10); }  $lastx10 = $x10;  gotoxy($x6, $x7); $mainwin->attrset($x8);}sub Center {  my ($x1, $x2, $x3, $x4) = @_;  if ($x4 eq 0)  {    addstr(wherey, $x2 + ($x3 / 2) - (length($x1) / 2), $x1);  }   else  {    for ($at_i = 1; $at_i <= length($x1) ; $at_i++)    {      addstr(wherey, $x2 + ($x3 / 2) - ($at_i / 2), substr($x1, 0, $at_i));      refresh();      $ri = time(); while ((time() - $ri < $x4) && (not keypressed())) { sleep(0.01); }      if (keypressed())      {        $at_i = length($x1);        addstr(wherey, $x2 + ($x3 / 2) - ($at_i / 2), substr($x1, 0, $at_i));      }    }  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -