Skip to content

Commit

Permalink
update some
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Sep 5, 2021
1 parent 2fed8f3 commit a9a98f2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/Controller/InteractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Inhere\Console\Controller;
use Inhere\Console\Util\Interact;
use Inhere\Console\Util\Show;
use Toolkit\Cli\Terminal;
use Toolkit\Cli\Util\Terminal;
use function preg_match;

/**
Expand Down Expand Up @@ -141,28 +141,28 @@ public function cursorCommand(): void
$this->write('this is a message text.', false);

sleep(1);
Terminal::make()->cursor(Terminal::CUR_BACKWARD, 6);
Terminal::instance()->cursor(Terminal::CURSOR_BACKWARD, 6);

sleep(1);
Terminal::make()->cursor(Terminal::CUR_FORWARD, 3);
Terminal::instance()->cursor(Terminal::CURSOR_FORWARD, 3);

sleep(1);
Terminal::make()->cursor(Terminal::CUR_BACKWARD, 2);
Terminal::instance()->cursor(Terminal::CURSOR_BACKWARD, 2);

sleep(2);

Terminal::make()->screen(Terminal::CLEAR_LINE, 3);
Terminal::instance()->screen(Terminal::CLEAR_LINE, 3);

$this->write('after 2s scroll down 3 row.');

sleep(2);

Terminal::make()->screen(Terminal::SCROLL_DOWN, 3);
Terminal::instance()->screen(Terminal::SCROLL_DOWN, 3);

$this->write('after 3s clear screen.');

sleep(3);

Terminal::make()->screen(Terminal::CLEAR);
Terminal::instance()->screen(Terminal::CLEAR);
}
}

0 comments on commit a9a98f2

Please sign in to comment.