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

📄 a_screen.pl

📁 AndyChat 是一种用Perl 来编写的多协议的控制台聊天程序。它的目的在于提供一种共同的控制台界面
💻 PL
字号:
##!/usr/bin/perl## Schpati - Pre-Alpha of AndyChat v3.xx# MODULE: Screen## Started on Friday, 24th of March, 2000 around 2pm## 24th of March, 2000# -  (2.02pm) Initial Porting :)# -  (2.14pm) scrolly porting done..# -  (2.30pm) .. and works perfectly and annoyingly :)# -  (7.41pm) Finished the paging scroll porting# -  (7.55pm) wspr now defined :)# -  (8.05pm) Resolved some scrolling issues when multi messages in queue# sub ChecktheMess {  sleep 0.01 if ! keypressed();  if ((! $rtiscr || time() - $rtiscr > 0.075) && ! $scrolloff && $window[$thiswin]{protocol} eq 1)  {#    $rla = wherex(); $rlb = wherey(); $rlc = getattrs($mainwin);    SaveModes();    if ($scrdir)    {      $wherescr++;      $stline = "Type text here";    }    else    {      $wherescr--;      $stline = "Type X to exit";    }    if ($wherescr eq 1)    {      $scrdir = 1;      $stline = "Type text here";      $wherescr = $wherescr + 2;      textcolor($colour{'border'}); addch($maxy - 3, 1, Lang(6));      textcolor($colour{'scrolly'}); gotoxy(2, $maxy - 3); addstr($stline);    }    elsif ($wherescr + length($stline) eq $maxx - 14)    {      $scrdir = "";      $stline = "Type X to exit";      $wherescr = $wherescr - 2;      textcolor($colour{'scrolly'}); gotoxy($wherescr - 1, $maxy - 3); addstr($stline);      textcolor($colour{'border'}); addch(Lang(6));    }    else    {      textcolor($colour{'scrolly'}); gotoxy($wherescr - 1, $maxy - 3); addstr($stline);      if ($scrdir) { gotoxy($wherescr - 2, $maxy - 3); } else { gotoxy($wherescr - 1 + length($stline), $maxy - 3); }      textcolor($colour{'border'}); addch(Lang(6));    }    $rtiscr = time();#    gotoxy($rla, $rlb); attrset($mainwin, $rlc);    RestoreModes();    sleep(0.01) if ! keypressed;    refresh();  }  if (! $cpagess && 22 - $pagesswaiting > 0)  {    $cpagess = $pagess[$pagesswaiting];    $pagesswaiting++;    UpdateGame(6);    $wscr2 = $maxx - 15;    $wspr = 0;  }  if ($cpagess)  {    if ((! $rti2 || time() - $rti2 > 0.05 && 22 - $pagesswaiting + 1 > 18) ||        (! $rti2 || time() - $rti2 > 0.075 && 22 - $pagesswaiting + 1 > 15) ||        (! $rti2 || time() - $rti2 > 0.1))    {#      $rla = wherex(); $rlb = wherey(); $rlc = getattrs($mainwin);      SaveModes();      $wscr2 = $wscr2 - 1;      if ($wscr2 < 2 && $wscr2 > - 29)      {        if (22 - $pagesswaiting > 0) { $wscr2 = -29; }      }      if ($wscr2 < - 28)      {        $wspr = $wscr2 + 30;        if ($wspr + length($cpagess) >= $maxx - 15)        {          textcolor($colour{'pagemsg'}); addstr($maxy - 1, 1, substr($cpagess, -1 - ($wspr - 3), $maxx - 17));        }        else        {          textcolor($colour{'pagemsg'}); addstr($maxy - 1, 1, substr($cpagess, -1 - ($wspr - 3))); # Check this          textcolor($colour{'border'}); addch(Lang(6));        }      }      elsif ($wscr2 < 2)      {      }      else      {        if ($wscr2 + length($cpagess) >= $maxx - 15)        {          textcolor($colour{'pagemsg'}); addstr($maxy - 1, $wscr2 - 1, substr($cpagess, 0, $maxx - 15 - $wscr2));        }        else        {          textcolor($colour{'pagemsg'}); addstr($maxy - 1, $wscr2 - 1, $cpagess); textcolor($colour{'border'}); addch(Lang(6));        }      }      if ($wspr eq 2 - length($cpagess))      {        $cpagess = "";      }      $rti2 = time();#      gotoxy($rla, $rlb); attrset($mainwin, $rlc);      RestoreModes();      refresh();    }  }}

⌨️ 快捷键说明

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