More work on Edit Frame

This commit is contained in:
Deon George
2019-10-02 15:47:56 +10:00
parent bb031b1b82
commit d43d5b71fd
5 changed files with 110 additions and 14 deletions

View File

@@ -2,8 +2,11 @@
namespace App\Classes\Control;
use Illuminate\Support\Arr;
use App\Classes\Control;
use App\Classes\Parser\Ansi;
use App\Classes\Frame;
use App\Classes\Server;
/**
* Class Edit Frame handles frame editing
@@ -15,6 +18,19 @@ class EditFrame extends Control
private $x = 1;
private $y = 1;
// The frame applicable for this control (not the current rendered frame, thats in $so)
protected $fo = NULL;
public function __construct(Server $so,array $args=[])
{
if (! $args OR ! Arr::get($args,'fo') OR (! $args['fo'] instanceof Frame))
throw new \Exception('Missing frame to Edit');
$this->fo = $args['fo'];
parent::__construct($so);
}
protected function boot()
{
// Clear screen and setup edit.