Add popup menus for actions
This commit is contained in:
@@ -73,11 +73,19 @@ class Terminal
|
||||
return [ $this->columns, $this->lines ];
|
||||
}
|
||||
|
||||
public function setCursor(int $column, int $row, bool $visible = false): void
|
||||
public function setCursor(int $column, int $row, bool $visible = false): self
|
||||
{
|
||||
if ($row > 0 && $column > 0)
|
||||
printf("\e[%d;%dH", $row, $column);
|
||||
echo "\e[?25".($visible?"h":"l");
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function writeAt(int $column, int $row, string $text, bool $visible = false): self
|
||||
{
|
||||
$this->setCursor($column, $row, $visible);
|
||||
echo $text;
|
||||
return $this;
|
||||
}
|
||||
|
||||
private string $inputBuffer = '';
|
||||
|
||||
Reference in New Issue
Block a user