TR
apps/winzik / src / Form / LockForm.php · commit 6576d6f
<?phpnamespace App\Form;use App\Scene\LockScene;use JumPHP\Gui\Button;use JumPHP\Gui\TextBox;/** * The password of the Lock mode (Form7.lcok_Click), then the black screen (Form14). * * @property TextBox $password * @property Button $cancel * @property Button $ok */final class LockForm extends WinZikDialog{    protected function loaded(array $params = []): void    {        $this->password->text = '';        $this->setFocus($this->password);    }    public function onPasswordSubmit(TextBox $sender): void    {        $this->onOkClick($this->ok);    }    public function onOkClick(Button $sender): void    {        $this->wz->lockPassword = $this->password->text;        $this->scenes()->pop();        $this->scenes()->push(LockScene::class);    }    public function onCancelClick(Button $sender): void    {        $this->close();    }}